makefile: Get pytest executable from a variable

Use PYTEST variable for the pytest executable. Initialize it with
'pytest' or 'pytest-3' (in Debian).
This commit is contained in:
Teemu Ikonen 2021-01-14 22:45:58 +02:00
parent 26296a085a
commit de811b2c2b
1 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,8 @@ PREFIX ?= /usr
PYTHON ?= python3
HELP2MAN ?= help2man
PYTEST ?= $(shell which pytest || which pytest-3)
##########################################################################
help:
@ -61,8 +63,8 @@ help:
##########################################################################
unittest:
LC_ALL=C PYTHONPATH=src/ pytest --ignore=tests --ignore=src/gpodder/utilwin32ctypes.py --doctest-modules src/gpodder/util.py src/gpodder/jsonconfig.py
LC_ALL=C PYTHONPATH=src/ pytest tests --ignore=src/gpodder/utilwin32ctypes.py --ignore=src/mygpoclient --cov=gpodder
LC_ALL=C PYTHONPATH=src/ $(PYTEST) --ignore=tests --ignore=src/gpodder/utilwin32ctypes.py --doctest-modules src/gpodder/util.py src/gpodder/jsonconfig.py
LC_ALL=C PYTHONPATH=src/ $(PYTEST) tests --ignore=src/gpodder/utilwin32ctypes.py --ignore=src/mygpoclient --cov=gpodder
# ISORTOPTS := -c share src/gpodder tools bin/* *.py # for isort >= 5.0
ISORTOPTS := -rc -c share src/gpodder tools bin/* *.py