Skip to content

Commit 1644b4a

Browse files
authored
Merge pull request #648 from cordada/task/make-file-pip-etc-versions-from-req-files
Replace hardcoded versions of Pip and others in Make variables
2 parents 0c75096 + 377825c commit 1644b4a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Makefile

+12-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,19 @@ SOURCES_ROOT = $(CURDIR)/src
66
# Python
77
PYTHON = python3
88
PYTHON_PIP = $(PYTHON) -m pip
9-
PYTHON_PIP_VERSION_SPECIFIER = ==23.3
10-
PYTHON_SETUPTOOLS_VERSION_SPECIFIER = ==65.5.1
9+
PYTHON_PIP_VERSION_SPECIFIER = $(shell \
10+
grep -E '^pip==.+' --no-filename --only-matching --no-messages -- requirements{,-dev}.{txt,in} \
11+
| head -n 1 | sed 's/^pip//' \
12+
)
13+
PYTHON_SETUPTOOLS_VERSION_SPECIFIER = $(shell \
14+
grep -E '^setuptools==.+' --no-filename --only-matching --no-messages -- requirements{,-dev}.{txt,in} \
15+
| head -n 1 | sed 's/^setuptools//' \
16+
)
1117
PYTHON_VIRTUALENV_DIR = venv
12-
PYTHON_PIP_TOOLS_VERSION_SPECIFIER = ==7.3.0
18+
PYTHON_PIP_TOOLS_VERSION_SPECIFIER = $(shell \
19+
grep -E '^pip-tools==.+' --no-filename --only-matching --no-messages -- requirements{,-dev}.{txt,in} \
20+
| head -n 1 | sed 's/^pip-tools//' \
21+
)
1322
PYTHON_PIP_TOOLS_SRC_FILES = requirements.in requirements-dev.in
1423
PYTHON_PIP_TOOLS_COMPILE_ARGS = --allow-unsafe --strip-extras --quiet
1524

0 commit comments

Comments
 (0)