on master help sign in
[perf] virtualenv: install boilerplate only once

Install boilerplate packages (pip, wheel, setuptools and requirements.txt) only once, when virtualenv is created. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commitd85012b49b1d251cebb63ec1326bb946d0b5f6b8 authorMarkus Heiser <markus.heiser@darmarit.de> dateThu 24 Dec 2020, 15:59 (6 years ago) parent2fc2d17
1 file changed+2−2
utils/makefile.python+2−2
utils/makefile.python+2−2
@@ -113,6 +113,8 @@ quiet_cmd_virtualenv = PYENV usage: $ source ./$@/bin/activate
113113 cmd_virtualenv = \
114114 if [ ! -d "./$(PY_ENV)" ];then \
115115 $(PYTHON) -m venv $(VTENV_OPTS) $2; \
116+ $(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -U pip wheel setuptools; \
117+ $(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -r requirements.txt; \
116118 else \
117119 echo "PYENV using virtualenv from $2"; \
118120 fi
@@ -193,8 +195,6 @@ pyclean:
193195pyenv: $(PY_ENV)
194196$(PY_ENV): python-exe
195197 $(call cmd,virtualenv,$(PY_ENV))
196− $(Q)$(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -U pip wheel pip setuptools
197− $(Q)$(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -r requirements.txt
198198
199199PHONY += pylint-exe
200200pylint-exe: $(PY_ENV)