mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 21:01:01 +00:00
makefile.python: remove python2 support
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
938bb02550
commit
04ad648105
2 changed files with 4 additions and 34 deletions
|
@ -27,7 +27,7 @@ searx-ve virtualenv and install the required packages using ``manage.sh``.
|
|||
cd ~/myprojects
|
||||
git clone https://github.com/asciimoo/searx.git
|
||||
cd searx
|
||||
virtualenv searx-ve
|
||||
python3 -m venv searx-ve
|
||||
. ./searx-ve/bin/activate
|
||||
./manage.sh update_dev_packages
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ PYLINT_RC ?= .pylintrc
|
|||
TEST_FOLDER ?= ./tests
|
||||
TEST ?= .
|
||||
|
||||
VTENV_OPTS = "--no-site-packages"
|
||||
VTENV_OPTS ?=
|
||||
PY_ENV = ./local/py$(PY)
|
||||
PY_ENV_BIN = $(PY_ENV)/bin
|
||||
PY_ENV_ACT = . $(PY_ENV_BIN)/activate
|
||||
|
@ -37,20 +37,6 @@ ifeq ($(OS),Windows_NT)
|
|||
PY_ENV_ACT = $(PY_ENV_BIN)/activate
|
||||
endif
|
||||
|
||||
ifeq ($(PYTHON),python)
|
||||
VIRTUALENV = virtualenv
|
||||
else
|
||||
VIRTUALENV = virtualenv --python=$(PYTHON)
|
||||
endif
|
||||
|
||||
ifeq ($(KBUILD_VERBOSE),1)
|
||||
PIP_VERBOSE =
|
||||
VIRTUALENV_VERBOSE =
|
||||
else
|
||||
PIP_VERBOSE = "-q"
|
||||
VIRTUALENV_VERBOSE = "-q"
|
||||
endif
|
||||
|
||||
python-help::
|
||||
@echo 'makefile.python:'
|
||||
@echo ' pyenv | pyenv[un]install'
|
||||
|
@ -110,22 +96,6 @@ pip-exe:
|
|||
@:
|
||||
endif
|
||||
|
||||
PHONY += msg-virtualenv-exe virtualenv-exe
|
||||
msg-virtualenv-exe:
|
||||
@echo "\n virtualenv is required\n\n\
|
||||
Make sure you have an updated virtualenv installed, grab it from\n\
|
||||
https://virtualenv.pypa.io/en/stable/installation/ or install it\n\
|
||||
via pip by::\n\n\
|
||||
pip install --user https://github.com/pypa/virtualenv/tarball/master\n" | $(FMT)
|
||||
|
||||
ifeq ($(shell which virtualenv >/dev/null 2>&1; echo $$?), 1)
|
||||
virtualenv-exe: msg-virtualenv-exe
|
||||
$(error The 'virtualenv' command was not found)
|
||||
else
|
||||
virtualenv-exe:
|
||||
@:
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# commands
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -153,7 +123,7 @@ quiet_cmd_pyenvuninstall = PYENV uninstall $2
|
|||
quiet_cmd_virtualenv = PYENV usage: $ source ./$@/bin/activate
|
||||
cmd_virtualenv = \
|
||||
if [ ! -d "./$(PY_ENV)" ];then \
|
||||
$(VIRTUALENV) $(VIRTUALENV_VERBOSE) $(VTENV_OPTS) $2; \
|
||||
$(PYTHON) -m venv $(VTENV_OPTS) $2; \
|
||||
else \
|
||||
echo "PYENV using virtualenv from $2"; \
|
||||
fi
|
||||
|
@ -232,7 +202,7 @@ pyclean:
|
|||
|
||||
# to build *local* environment, python and virtualenv from the OS is needed!
|
||||
pyenv: $(PY_ENV)
|
||||
$(PY_ENV): virtualenv-exe python-exe
|
||||
$(PY_ENV): python-exe
|
||||
$(call cmd,virtualenv,$(PY_ENV))
|
||||
@$(PY_ENV_BIN)/pip install $(PIP_VERBOSE) -r requirements.txt
|
||||
|
||||
|
|
Loading…
Reference in a new issue