Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error DisplayCAL is already installed #337

Merged
merged 2 commits into from
Mar 24, 2024

Conversation

lunochod
Copy link

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.

- fix ERROR: venv is up-to-date
  change Makefile "venv" build target to "environment" build target to avoid
  collision with possible existing PyCharm venv folder
- fix ERROR: DisplayCAL is already installed
  change Makefile "install" build target to use --force-reinstall by
  default since 'make build' will already list DisplayCAL as installed
  using pip
@eoyilmaz
Copy link
Owner

eoyilmaz commented Mar 24, 2024

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
Copy link
Author

Updated the PR to use .PHONY

Copy link
Owner

@eoyilmaz eoyilmaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems okay now 👍

@eoyilmaz eoyilmaz merged commit 1c866b0 into eoyilmaz:develop Mar 24, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants