diff --git a/Makefile b/Makefile index e2145dc9..ea341678 100644 --- a/Makefile +++ b/Makefile @@ -2,35 +2,32 @@ # To use a specific Python version run: # $ make install PYTHON=python3.7 # To run a specific test: -# $ make install ARGS="-v -s pyftpdlib/test/test_functional.py::TestIPv6MixedEnvironment::test_port_v4" +# $ make test ARGS="-v -s pyftpdlib/test/test_functional.py::TestIPv6MixedEnvironment::test_port_v4" -# args configurable via cmdline PYTHON = python3 ARGS = -# deps needed for testing +# mandatory deps for running tests PYDEPS = \ psutil \ pyopenssl \ pytest \ setuptools - -# deps needed for development +# dev deps ifndef GITHUB_ACTIONS -PYDEPS += \ - black \ - check-manifest \ - coverage \ - pylint \ - pytest-cov \ - rstcheck \ - ruff \ - teyit \ - toml-sort \ - twine + PYDEPS += \ + black \ + check-manifest \ + coverage \ + pylint \ + pytest-cov \ + rstcheck \ + ruff \ + teyit \ + toml-sort \ + twine endif - -# deps for python 2 +# python 2 deps ifeq ($(shell $(PYTHON) -c "import sys; print(sys.version_info[0])"), 2) PYDEPS = \ ipaddress \ @@ -48,6 +45,8 @@ TEST_PREFIX = PYTHONWARNINGS=always PYTEST_ARGS = -v --tb=native -o cache_dir=/tmp/pyftpdlib-pytest-cache NUM_WORKERS = `$(PYTHON) -c "import os; print(os.cpu_count() or 1)"` +# if make is invoked with no arg, default to `make help` +.DEFAULT_GOAL := help # =================================================================== # Install