mirror of https://github.com/searxng/searxng.git
[mod] more robust make pyenv / make pyenvinstall
"make pyenv" ensures that ./local/py3/bin/python is an executable
This commit is contained in:
parent
806af50738
commit
d70c5a621a
|
@ -99,7 +99,8 @@ quiet_cmd_pyinstall = INSTALL $2
|
|||
quiet_cmd_pyenvinstall = PYENV install $2
|
||||
cmd_pyenvinstall = \
|
||||
if ! cat $(PY_ENV)/requirements.sha256 2>/dev/null | sha256sum --check --status 2>/dev/null; then \
|
||||
$(PY_ENV_BIN)/python -m pip $(PIP_VERBOSE) install -e $2$(PY_SETUP_EXTRAS) ;\
|
||||
rm -f $(PY_ENV)/requirements.sha256; \
|
||||
$(PY_ENV_BIN)/python -m pip $(PIP_VERBOSE) install -e $2$(PY_SETUP_EXTRAS) &&\
|
||||
sha256sum requirements*.txt > $(PY_ENV)/requirements.sha256 ;\
|
||||
else \
|
||||
echo "PYENV $2 already installed"; \
|
||||
|
@ -119,12 +120,12 @@ quiet_cmd_pyenvuninstall = PYENV uninstall $2
|
|||
# $2 path to folder where virtualenv take place
|
||||
quiet_cmd_virtualenv = PYENV usage: $ source ./$@/bin/activate
|
||||
cmd_virtualenv = \
|
||||
if [ ! -d "./$(PY_ENV)" ];then \
|
||||
if [ -d "./$(PY_ENV)" -a -x "./$(PY_ENV_BIN)/python" ]; then \
|
||||
echo "PYENV using virtualenv from $2"; \
|
||||
else \
|
||||
$(PYTHON) -m venv $(VTENV_OPTS) $2; \
|
||||
$(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -U pip wheel setuptools; \
|
||||
$(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -r requirements.txt; \
|
||||
else \
|
||||
echo "PYENV using virtualenv from $2"; \
|
||||
fi
|
||||
|
||||
# $2 path to lint
|
||||
|
|
Loading…
Reference in New Issue