Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
96 lines (78 sloc) 2.13 KB
.PHONY: clean-pyc clean-build docs clean clean-docs
help:
@echo "clean - remove all build, test, coverage, docs and Python artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove test and coverage artifacts"
@echo "clean-docs - remove docs artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "test-all - run tests on every Python version with tox"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation"
@echo "pdf - generate Sphinx PDF documentation"
@echo "linkcheck - check documentation html links"
@echo "release - package and upload a release"
@echo "dist - package"
@echo "install - install the package to the active Python's site-packages"
clean: clean-build clean-pyc clean-test clean-docs
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test:
rm -fr .tox/
rm -f .coverage
rm -f coverage.xml
rm -fr htmlcov/
clean-docs:
$(MAKE) -C docs clean
lint:
flake8 minimalmodbus tests
test:
python setup.py test
test-all:
rm -fr .tox/
tox
coverage:
rm -fr htmlcov/
coverage run setup.py test
coverage report -m
coverage html
@echo " "
@echo " "
@echo " "
@echo "Opening web browser ..."
xdg-open htmlcov/index.html
docs: clean-docs
$(MAKE) -C docs html
@echo " "
@echo " "
@echo " "
@echo "Opening web browser ..."
xdg-open docs/_build/html/index.html
pdf:
$(MAKE) -C docs latexpdf
@echo " "
@echo " "
@echo " "
@echo "Opening PDF reader ..."
xdg-open docs/_build/latex/minimalmodbus.pdf
linkcheck:
$(MAKE) -C docs linkcheck
release: clean
python setup.py sdist upload
python setup.py bdist_wheel upload
dist: clean
python setup.py sdist
python setup.py bdist_wheel
ls -l dist
install: clean
python setup.py install