-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (30 loc) · 894 Bytes
/
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
help:
@echo "Please use \`make <target>' where <target> is one or more of"
@echo " build generate both sdist and wheel suitable for upload to PyPI"
@echo " clean delete intermediate work product and start fresh"
@echo " coverage run pytest with coverage"
@echo " test run unit tests using pytest"
@echo " test-upload upload distribution to TestPyPI"
@echo " upload upload distribution tarball to PyPI"
.PHONY: build
build:
rm -rf dist
python -m build
twine check dist/*
.PHONY: clean
clean:
fd -t d "^__pycache__$$" . -x rm -rf
fd -e pyc -I -x rm
rm -rf dist .coverage .DS_Store
.PHONY: coverage
coverage:
py.test --cov-report term-missing --cov=src tests/
.PHONY: test
test:
pytest -x
.PHONY: test-release
test-release: clean build
twine upload --repository testpypi dist/*
.PHONY: release
release: clean build
twine upload dist/*