Debian Codegraph @

Makefile

raw
1 SHELL := /bin/bash
2 TRAVIS_PYTHON_VERSION ?= $(shell python3 --version | cut -d ' ' -f 2)
3
4 dist:
5 python3 setup.py sdist
6
7 release:
8 python3 setup.py sdist bdist_wheel upload --sign
9
10 test-release:
11 python3 setup.py sdist bdist_wheel upload --repository https://test.pypi.org/legacy/ --sign
12
13 test:
14 flake8 *.py --verbose
15 coverage run --branch -m unittest test --verbose
16 coverage report --fail-under 95 --show-missing
17 if [[ "$(TRAVIS_PYTHON_VERSION)" != 'pypy'* ]]; then \
18 set -e; \
19 mypy streamparser.py --strict --any-exprs-report .mypy_coverage; \
20 cat .mypy_coverage/any-exprs.txt; \
21 coverage=$$(tail -1 .mypy_coverage/any-exprs.txt | grep -Eo '[0-9\.]+%' | sed 's/%$$//'); \
22 exit $$(echo "$${coverage} < 96" | bc -l); \
23 fi
24
25 distclean:
26 rm -rf dist/ build/ *.egg-info/ .mypy_cache/ .mypy_coverage/ .coverage __pycache__/