1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
PYTHON ?= python3
.PHONY: all
all: clean-pyc clean-backupfiles style-check type-check test
.PHONY: clean
clean: clean-pyc clean-pycache clean-patchfiles clean-backupfiles clean-testfiles clean-buildfiles clean-distfiles clean-mypyfiles
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
.PHONY: clean-pycache
clean-pycache:
find . -name __pycache__ -exec rm -rf {} +
.PHONY: clean-patchfiles
clean-patchfiles:
find . -name '*.orig' -exec rm -f {} +
find . -name '*.rej' -exec rm -f {} +
.PHONY: clean-backupfiles
clean-backupfiles:
find . -name '*~' -exec rm -f {} +
find . -name '*.bak' -exec rm -f {} +
find . -name '*.swp' -exec rm -f {} +
find . -name '*.swo' -exec rm -f {} +
.PHONY: clean-testfiles
clean-testfiles:
rm -rf tests/.coverage
rm -rf tests/build
rm -rf .tox/
rm -rf .cache/
.PHONY: clean-buildfiles
clean-buildfiles:
rm -rf build
.PHONY: clean-distfiles
clean-dist:files
rm -rf dist/
.PHONY: clean-mypyfiles
clean-mypyfiles:
rm -rf .mypy_cache/
.PHONY: style-check
style-check:
@ruff check
.PHONY: type-check
type-check:
mypy sphinxcontrib
.PHONY: test
test:
@$(PYTHON) -m pytest -v $(TEST)
|