eoyilmaz / displaycal-py3

DisplayCAL Modernization Project
https://eoyilmaz.github.io/displaycal-py3/
GNU General Public License v3.0
773 stars 56 forks source link

Fix error DisplayCAL is already installed #337

Closed lunochod closed 6 months ago

lunochod commented 6 months ago

Fix ERROR: venv is up-to-date

If the user has an existing venv folder in the main project directory, make build will fail since make venv will exit with the message that the build target venv is up-to-date. This situation occurs when the popular PyCharm IDE is used with the project that creates a venv folder for its environment. Renaming the build target avoids this collision.

Fix ERROR: DisplayCAL is already installed

After make build pip will already list DisplayCAL as an installed packaged which can be verified with pip list | grep DisplayCAL and therefor not install DisplayCAL despite the fact that .venv/bin/displaycal doesn't exist. Adding --force-reinstall will avoid this error.

eoyilmaz commented 6 months ago

Hmm the correct solution would be to add .PHONY: venv before venv: in the Makefile:

.PHONY: venv
venv:
    python3 -m venv $(VIRTUALENV_DIR); \
    source ./$(VIRTUALENV_DIR)/bin/activate; \
    pip install -r requirements.txt; \
    pip install -r requirements-dev.txt;
lunochod commented 6 months ago

Updated the PR to use .PHONY