# SPDX-License-Identifier: LGPL-3.0

PY_PATHS = tests amethyst

.PHONY: all sdist dist debbuild clean test doc


check::
	python3 -m flake8 --config=extra/flake8.ini ${PY_PATHS}
	@echo OK

clean:
	rm -rf build dist debbuild _doc .tox amethyst_core.egg-info
	rm -f MANIFEST
	python3 setup.py clean

doc:
	sphinx-build -q -n -E -b singlehtml doc _doc/html

sdist: test
	python3 setup.py sdist

test:
	python3 -m pytest --cov=amethyst/ --cov-branch --cov-report=html:_coverage tests

test-pypy:
	for f in tests/test_*.py; do pypy3 -E -B "$$f"; done

wheel:
	python3 setup.py bdist_wheel

zip: test
	python3 setup.py sdist --format=zip


# Optionally include Makefile.local for per-developer make targets
-include Makefile.local
