Debian Codegraph @

Makefile

raw
1 .PHONY: all
2 all:
3 @echo "Nothing to build. Try 'make help' perhaps?"
4
5 ##: Testing
6
7 .PHONY: test
8 test: ##: run tests
9 tox -p auto
10
11 .PHONY: check
12 check: ##: run tests without skipping any
13 # 'make check' is defined in release.mk and here's how you can override it
14 define check_recipe =
15 SKIP_NO_TESTS=1 tox
16 endef
17
18 .PHONY: coverage
19 coverage: ##: measure test coverage
20 tox -e coverage
21
22 .PHONY: diff-cover
23 diff-cover: coverage ##: show untested code in this branch
24 coverage xml
25 diff-cover coverage.xml
26
27 ##: Linting
28
29 .PHONY: lint
30 lint: ##: run all linters
31 tox -p auto -e flake8,mypy,isort,check-manifest,check-python-versions
32
33 .PHONY: flake8
34 flake8: ##: check for style problems
35 tox -e flake8
36
37 .PHONY: isort
38 isort: ##: check for incorrect import ordering
39 tox -e isort
40
41 .PHONY: mypy
42 mypy: ##: check for type errors
43 tox -e mypy
44
45 ##: GitHub maintenance
46
47 .PHONY: update-github-branch-protection-rules
48
49 update-github-branch-protection-rules: ##: update GitHub branch protection rules
50 uv run --script .github/update_branch_protection_rules.py
51
52 ##: Releasing
53
54 .PHONY: distcheck
55 distcheck: distcheck-self # also release.mk will add other checks
56
57 .PHONY: distcheck-self
58 distcheck-self:
59 tox -e check-manifest
60
61 .PHONY: releasechecklist
62 releasechecklist: check-readme # also release.mk will add other checks
63
64 .PHONY: check-readme
65 check-readme:
66 @rev_line=' rev: "'"`$(PYTHON) setup.py --version`"'"' && \
67 ! grep "rev: " README.rst | grep -qv "^$$rev_line$$" || { \
68 echo "README.rst doesn't specify $$rev_line"; \
69 echo "Please run make update-readme"; exit 1; }
70
71 .PHONY: update-readme
72 update-readme:
73 sed -i -e 's/rev: ".*"/rev: "$(shell $(PYTHON) setup.py --version)"/' README.rst
74
75 FILE_WITH_VERSION = check_manifest.py
76 include release.mk
77 HELP_INDENT = " "