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
|
.PHONY: lint check format test docker-test clean publish docs livedocs all
.DEFAULT_GOAL := all
source_dirs = dbus_next test examples
lint:
python3 -m flake8 $(source_dirs)
check: lint
python3 -m yapf -rdp $(source_dirs)
format:
python3 -m yapf -rip $(source_dirs)
test:
for py in python3.6 python3.7 python3.9 python3.10 python3.8 ; do \
if hash $$py; then \
dbus-run-session $$py -m pytest -sv --cov=dbus_next || exit 1 ; \
fi \
done \
docker-test:
docker build -t dbus-next-test .
docker run -it dbus-next-test
clean:
rm -rf dist dbus_next.egg-info build docs/_build
rm -rf `find -type d -name __pycache__`
publish:
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
docs:
sphinx-build docs docs/_build/html
livedocs:
sphinx-autobuild docs docs/_build/html --watch dbus_next
all: format lint test
|