-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (82 loc) · 2.3 KB
/
Makefile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
.DEFAULT_GOAL := help
all: build
.PHONY:
install: ## setup user environment
./bootstrap.sh
setup: install
.PHONY:
install-dev: ## setup development environment
./bootstrap.sh --dev
setup-dev: install-dev
.PHONY:
build: ## build wheels and sdists
./run.sh poetry build
.PHONY:
extract-build: build ## extract built archives into folders
cd dist; for x in *; do mkdir "$$x-extracted"; tar -xzf "$$x" -C "$$x-extracted"; done
.PHONY:
clean: ## clean all temp, cache, and build files
rm -rf .mypy_cache
rm -rf .pytest_cache
rm -rf .reports
rm -rf dist
rm -rf htmlcov
rm -f .coverage
rm -f .coverage.*
rm -f cov.xml
rm -f coverage.cobertura.xml
rm -f coverage.json
rm -f coverage.html
rm -f coverage.xml
rm -f jacoco.xml
rm -f lcov.info
rm -f lcov.xml
find . \( -name '__pycache__' -or -name '*.pyc' -or -name '*.pyo' -or -name '*.pyd' \) -print0 | xargs -r0 rm -rf
.PHONY:
clean-old: ## remove all *.old files
find . -name '*.old' -print0 | xargs -r0 rm -f
.PHONY:
clean-tox: ## remove tox environments
rm -rf .tox
.PHONY:
sterile: clean clean-old clean-tox ## clean EVERYTHING
superclean: sterile
.PHONY:
run: ## run software
./run.sh
.PHONY:
update-bfi: ## update batteries-forking-included files
./bfi-update.sh
.PHONY:
quicktest: ## run tests for latest python version
./run.sh tox -e py310-wheel --
.PHONY:
legacytest: ## run tests for oldest supported python version
./run.sh tox -e py38-wheel --
.PHONY:
coverage: ## gather coverage data
./run.sh tox -e coverage -- --verbose
.PHONY:
lint: ## run all linters
./run.sh tox -e lint -- --verbose
.PHONY:
test: ## run all tests for all python versions, linters, and gather coverage
./run.sh tox
check: test
.PHONY:
help: ## show this help message
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \
printf "%s\n\n" "Usage: make [task]"; \
printf "%-20s %s\n" "task" "help" ; \
printf "%-20s %s\n" "------" "----" ; \
for help_line in $${help_lines[@]}; do \
IFS=$$':' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf '\033[36m'; \
printf "%-20s %s" $$help_command ; \
printf '\033[0m'; \
printf "%s\n" $$help_info; \
done