From e3660e2db8038aed069f2ad3dea8eb1e259e8f32 Mon Sep 17 00:00:00 2001 From: lunochod Date: Sat, 23 Mar 2024 13:29:38 -0400 Subject: [PATCH 1/2] Fix error DisplayCAL is already installed - 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 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9a334a2f..4573eefd 100644 --- a/Makefile +++ b/Makefile @@ -13,19 +13,19 @@ help: @echo "Available targets:" @make -qp | grep -o '^[a-z0-9-]\+' | sort -venv: +environment: python3 -m venv $(VIRTUALENV_DIR); \ source ./$(VIRTUALENV_DIR)/bin/activate; \ pip install -r requirements.txt; \ pip install -r requirements-dev.txt; -build: venv FORCE +build: environment FORCE source ./$(VIRTUALENV_DIR)/bin/activate; \ python3 -m build; install: source ./$(VIRTUALENV_DIR)/bin/activate; \ - pip install ./dist/DisplayCAL-$(VERSION)-*.whl; + pip install ./dist/DisplayCAL-$(VERSION)-*.whl --force-reinstall; launch: source ./.venv/bin/activate; \ @@ -66,7 +66,7 @@ new-release: # twine upload dist/DisplayCAL-$(VERSION).whl twine upload dist/DisplayCAL-$(VERSION).tar.gz -tests: venv build install +tests: environment build install source $(VIRTUALENV_DIR)/bin/activate; \ pytest -v -n auto -W ignore --color=yes --cov-report term; From 29a436a23fe871c795098be587881434b034617e Mon Sep 17 00:00:00 2001 From: lunochod Date: Sun, 24 Mar 2024 09:17:20 -0400 Subject: [PATCH 2/2] use PHONY to hide venv as file target --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4573eefd..27c93f97 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,14 @@ help: @echo "Available targets:" @make -qp | grep -o '^[a-z0-9-]\+' | sort -environment: +.PHONY: venv +venv: python3 -m venv $(VIRTUALENV_DIR); \ source ./$(VIRTUALENV_DIR)/bin/activate; \ pip install -r requirements.txt; \ pip install -r requirements-dev.txt; -build: environment FORCE +build: venv FORCE source ./$(VIRTUALENV_DIR)/bin/activate; \ python3 -m build; @@ -66,7 +67,7 @@ new-release: # twine upload dist/DisplayCAL-$(VERSION).whl twine upload dist/DisplayCAL-$(VERSION).tar.gz -tests: environment build install +tests: venv build install source $(VIRTUALENV_DIR)/bin/activate; \ pytest -v -n auto -W ignore --color=yes --cov-report term;