File: Makefile

package info (click to toggle)
apertium-streamparser 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 136 kB
  • sloc: python: 292; makefile: 26
file content (26 lines) | stat: -rw-r--r-- 833 bytes parent folder | download
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
SHELL := /bin/bash
TRAVIS_PYTHON_VERSION ?= $(shell python3 --version | cut -d ' ' -f 2)

dist:
	python3 setup.py sdist

release:
	python3 setup.py sdist bdist_wheel upload --sign

test-release:
	python3 setup.py sdist bdist_wheel upload --repository https://test.pypi.org/legacy/ --sign

test:
	flake8 *.py --verbose
	coverage run --branch -m unittest test --verbose
	coverage report --fail-under 95 --show-missing
	if [[ "$(TRAVIS_PYTHON_VERSION)" != 'pypy'* ]]; then \
		set -e; \
		mypy streamparser.py --strict --any-exprs-report .mypy_coverage; \
		cat .mypy_coverage/any-exprs.txt; \
		coverage=$$(tail -1 .mypy_coverage/any-exprs.txt | grep -Eo '[0-9\.]+%' | sed 's/%$$//'); \
		exit $$(echo "$${coverage} < 96" | bc -l); \
	fi

distclean:
	rm -rf dist/ build/ *.egg-info/ .mypy_cache/ .mypy_coverage/ .coverage __pycache__/