mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
Merge pull request #2517 from dalf/debug-ci
Update pyenv pyenvinstall Make targets
This commit is contained in:
commit
0a8799b834
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
make V=1 install
|
make V=1 install
|
||||||
make V=1 gecko.driver
|
make V=1 gecko.driver
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make V=1 test
|
run: make V=1 ci.test
|
||||||
- name: Test coverage
|
- name: Test coverage
|
||||||
run: make V=1 test.coverage
|
run: make V=1 test.coverage
|
||||||
- name: Store coverage result
|
- name: Store coverage result
|
||||||
|
5
Makefile
5
Makefile
@ -251,6 +251,11 @@ test.clean:
|
|||||||
# travis
|
# travis
|
||||||
# ------
|
# ------
|
||||||
|
|
||||||
|
PHONY += ci.test
|
||||||
|
ci.test:
|
||||||
|
$(PY_ENV_BIN)/python -c "import yaml" || make clean
|
||||||
|
$(MAKE) test
|
||||||
|
|
||||||
travis.codecov:
|
travis.codecov:
|
||||||
$(Q)$(PY_ENV_BIN)/python -m pip install codecov
|
$(Q)$(PY_ENV_BIN)/python -m pip install codecov
|
||||||
|
|
||||||
|
@ -87,6 +87,22 @@ python-exe:
|
|||||||
@:
|
@:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
msg-pip-exe:
|
||||||
|
@echo "\n $(PIP) is required\n\n\
|
||||||
|
Make sure you have updated pip installed, grab it from\n\
|
||||||
|
https://pip.pypa.io or install it from your package\n\
|
||||||
|
manager. On debian based OS these requirements are\n\
|
||||||
|
installed by::\n\n\
|
||||||
|
sudo -H apt-get install python$(PY)-pip\n" | $(FMT)
|
||||||
|
|
||||||
|
ifeq ($(shell which $(PIP) >/dev/null 2>&1; echo $$?), 1)
|
||||||
|
pip-exe: msg-pip-exe
|
||||||
|
$(error The '$(PIP)' command was not found)
|
||||||
|
else
|
||||||
|
pip-exe:
|
||||||
|
@:
|
||||||
|
endif
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# commands
|
# commands
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -99,7 +115,8 @@ quiet_cmd_pyinstall = INSTALL $2
|
|||||||
quiet_cmd_pyenvinstall = PYENV install $2
|
quiet_cmd_pyenvinstall = PYENV install $2
|
||||||
cmd_pyenvinstall = \
|
cmd_pyenvinstall = \
|
||||||
if ! cat $(PY_ENV)/requirements.sha256 2>/dev/null | sha256sum --check --status 2>/dev/null; then \
|
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 ;\
|
sha256sum requirements*.txt > $(PY_ENV)/requirements.sha256 ;\
|
||||||
else \
|
else \
|
||||||
echo "PYENV $2 already installed"; \
|
echo "PYENV $2 already installed"; \
|
||||||
@ -119,12 +136,12 @@ quiet_cmd_pyenvuninstall = PYENV uninstall $2
|
|||||||
# $2 path to folder where virtualenv take place
|
# $2 path to folder where virtualenv take place
|
||||||
quiet_cmd_virtualenv = PYENV usage: $ source ./$@/bin/activate
|
quiet_cmd_virtualenv = PYENV usage: $ source ./$@/bin/activate
|
||||||
cmd_virtualenv = \
|
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; \
|
$(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) -U pip wheel setuptools; \
|
||||||
$(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -r requirements.txt; \
|
$(PY_ENV_BIN)/python -m pip install $(PIP_VERBOSE) -r requirements.txt; \
|
||||||
else \
|
|
||||||
echo "PYENV using virtualenv from $2"; \
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# $2 path to lint
|
# $2 path to lint
|
||||||
|
Loading…
Reference in New Issue
Block a user