1
+ export VENV_PATH := .venv
1
2
# Use python executables inside venv
2
- export PATH := .venv /bin:$(PATH )
3
+ export PATH := $( VENV_PATH ) /bin:$(PATH )
3
4
export PYTHONPATH =.
4
5
5
6
# 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 )
8
9
9
10
# 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
11
12
pip install --quiet --upgrade ' pip==23.3.1' ' pip-tools==7.3'
12
13
13
14
# 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
15
16
pip-compile \
16
17
--quiet --generate-hashes --max-rounds=20 --strip-extras \
17
18
--resolver=backtracking \
18
19
--output-file requirements/dev.txt \
19
20
requirements/dev.in pyproject.toml
20
21
21
22
# upgrades the dependencies to their latest/matching version
22
- upgrade : .venv
23
+ upgrade : $( VENV_PATH )
23
24
pip-compile \
24
25
--quiet --generate-hashes --max-rounds=20 --strip-extras \
25
26
--upgrade \
@@ -30,7 +31,7 @@ upgrade: .venv
30
31
31
32
# creates the venv if not present then install the dependencies, the package and pre-commit
32
33
.PHONY : install
33
- install : .venv
34
+ install : $( VENV_PATH )
34
35
pip-sync requirements/dev.txt
35
36
# install pylint_pytest (deps are already handled by the line before)
36
37
pip install --no-deps -e .
0 commit comments