Skip to content

Commit 188b53f

Browse files
committed
Create VENV_PATH variable; drop .DS_Store
Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
1 parent cf107ea commit 188b53f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.DS_Store

-6 KB
Binary file not shown.

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1+
export VENV_PATH := .venv
12
# Use python executables inside venv
2-
export PATH := .venv/bin:$(PATH)
3+
export PATH := $(VENV_PATH)/bin:$(PATH)
34
export PYTHONPATH=.
45

56
# creates the venv
6-
.venv/bin/python3.11:
7-
python3.11 -m venv .venv
7+
$(VENV_PATH)/bin/python3.11:
8+
python3.11 -m venv $(VENV_PATH)
89

910
# makes sures the venv contains a given version of pip and pip-tools
10-
.venv: .venv/bin/python3.11
11+
$(VENV_PATH): $(VENV_PATH)/bin/python3.11
1112
pip install --quiet --upgrade 'pip==23.3.1' 'pip-tools==7.3'
1213

1314
# generates a lock file with pinned version of all dependencies to be used by the CI and local devs
14-
requirements/dev.txt: .venv requirements/dev.in pyproject.toml
15+
requirements/dev.txt: $(VENV_PATH) requirements/dev.in pyproject.toml
1516
pip-compile \
1617
--quiet --generate-hashes --max-rounds=20 --strip-extras \
1718
--resolver=backtracking \
1819
--output-file requirements/dev.txt \
1920
requirements/dev.in pyproject.toml
2021

2122
# upgrades the dependencies to their latest/matching version
22-
upgrade: .venv
23+
upgrade: $(VENV_PATH)
2324
pip-compile \
2425
--quiet --generate-hashes --max-rounds=20 --strip-extras \
2526
--upgrade \
@@ -30,7 +31,7 @@ upgrade: .venv
3031

3132
# creates the venv if not present then install the dependencies, the package and pre-commit
3233
.PHONY: install
33-
install: .venv
34+
install: $(VENV_PATH)
3435
pip-sync requirements/dev.txt
3536
# install pylint_pytest (deps are already handled by the line before)
3637
pip install --no-deps -e .

0 commit comments

Comments
 (0)