From 188b53f1f5b5918fd5261787a61ab0e32b3e2641 Mon Sep 17 00:00:00 2001 From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:37:25 +0200 Subject: [PATCH] Create `VENV_PATH` variable; drop `.DS_Store` Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- .DS_Store | Bin 6148 -> 0 bytes Makefile | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index c88a062b05be4fd1d362b3e4c6a7481e718b69d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~O$x$5422WzLU7Zi%h`AUZ!n0Spcima5J4*Vx1OW>k_m#k8KJGkN^pg011%5 z4-v3?8#bF)Wh4O-Ab}?V`#vPNX$~z_{nLTqBLK8P*$r!-C7{U)&>UK-q5{*H9yD6j z#}KP~J2b_)99pW@cF`C;crrWIXQgOGwy`I%~QMGk}L;X0y%TE9jyNVZZH|!@{KyzrRiVBQB0*--!1inh( E0rZ6u#{d8T diff --git a/Makefile b/Makefile index c4454e9..2d0e91d 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ +export VENV_PATH := .venv # Use python executables inside venv -export PATH := .venv/bin:$(PATH) +export PATH := $(VENV_PATH)/bin:$(PATH) export PYTHONPATH=. # creates the venv -.venv/bin/python3.11: - python3.11 -m venv .venv +$(VENV_PATH)/bin/python3.11: + python3.11 -m venv $(VENV_PATH) # makes sures the venv contains a given version of pip and pip-tools -.venv: .venv/bin/python3.11 +$(VENV_PATH): $(VENV_PATH)/bin/python3.11 pip install --quiet --upgrade 'pip==23.3.1' 'pip-tools==7.3' # generates a lock file with pinned version of all dependencies to be used by the CI and local devs -requirements/dev.txt: .venv requirements/dev.in pyproject.toml +requirements/dev.txt: $(VENV_PATH) requirements/dev.in pyproject.toml pip-compile \ --quiet --generate-hashes --max-rounds=20 --strip-extras \ --resolver=backtracking \ @@ -19,7 +20,7 @@ requirements/dev.txt: .venv requirements/dev.in pyproject.toml requirements/dev.in pyproject.toml # upgrades the dependencies to their latest/matching version -upgrade: .venv +upgrade: $(VENV_PATH) pip-compile \ --quiet --generate-hashes --max-rounds=20 --strip-extras \ --upgrade \ @@ -30,7 +31,7 @@ upgrade: .venv # creates the venv if not present then install the dependencies, the package and pre-commit .PHONY: install -install: .venv +install: $(VENV_PATH) pip-sync requirements/dev.txt # install pylint_pytest (deps are already handled by the line before) pip install --no-deps -e .