-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (31 loc) · 991 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
37
38
39
40
41
42
.PHONY: test devinstall unittests coveragetest coverage flaketest checkmanifest clean build check_tag release
test: flaketest coveragetest checkmanifest
devinstall:
pip install --upgrade --upgrade-strategy eager -e .[test]
unittests:
# Run unit tests with coverage
coverage run ./runtests.py
coveragetest: unittests
# Generate coverage report and require minimum coverage
coverage report
coverage: unittests
# Generate test coverage html report
coverage html
@echo "Coverage report is located at ./var/htmlcov/index.html"
flaketest:
# Check syntax and style
flake8
checkmanifest:
# Check if all files are included in the sdist
check-manifest
clean:
# Remove build/dist dirs
rm -rf build dist
build: test clean
# Test, clean and build
python setup.py build sdist bdist_wheel
check_tag:
@echo "Did you bump the version number and tag a new version? [y/N] " && read ans && [ $${ans:-N} = y ]
release: check_tag build
# Build and upload to PyPI
twine upload dist/*