Skip to content

Commit d8f956d

Browse files
committed
add a Makefile for common tasks
1 parent 7eafc4e commit d8f956d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# lists all available targets
2+
list:
3+
@sh -c "$(MAKE) -p no_targets__ | \
4+
awk -F':' '/^[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {\
5+
split(\$$1,A,/ /);for(i in A)print A[i]\
6+
}' | grep -v '__\$$' | grep -v 'make\[1\]' | grep -v 'Makefile' | sort"
7+
8+
# required for list
9+
no_targets__:
10+
11+
12+
clean:
13+
@rm -rf build dist .eggs *.egg-info
14+
@rm -rf .benchmarks .coverage coverage.xml htmlcov report.xml .tox
15+
@find . -type d -name '.mypy_cache' -exec rm -rf {} +
16+
@find . -type d -name '__pycache__' -exec rm -rf {} +
17+
@find . -type d -name '*pytest_cache*' -exec rm -rf {} +
18+
@find . -type f -name "*.py[co]" -exec rm -rf {} +
19+
20+
fmt: clean
21+
@poetry run isort .
22+
@poetry run black .
23+
24+
hard-clean: clean
25+
@rm -rf .venv
26+
27+
pypi:
28+
@poetry build && poetry publish

0 commit comments

Comments
 (0)