Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .PHONY: clean-pyc clean-build docs clean test
  2. help:
  3. @echo "clean-build - remove build artifacts"
  4. @echo "clean-pyc - remove Python file artifacts"
  5. @echo "lint - check style with flake8"
  6. @echo "test - run tests quickly with the default Python"
  7. @echo "test-all - run tests on every Python version with tox"
  8. @echo "coverage - check code coverage quickly with the default Python"
  9. @echo "docs - generate Sphinx HTML documentation, including API docs"
  10. @echo "release - package and upload a release"
  11. @echo "dist - package"
  12. clean: clean-build clean-pyc
  13. rm -fr htmlcov/
  14. clean-build:
  15. rm -fr build/
  16. rm -fr dist/
  17. rm -fr *.egg-info
  18. clean-pyc:
  19. find . -name '*.pyc' -exec rm -f {} +
  20. find . -name '*.pyo' -exec rm -f {} +
  21. find . -name '*~' -exec rm -f {} +
  22. lint:
  23. flake8 pwman scripts
  24. test: install
  25. git checkout pwman/tests/pwman.v0.0.8.db
  26. python setup.py test
  27. test-all:
  28. tox
  29. coverage:
  30. coverage run --source pwman setup.py test
  31. coverage report -m
  32. coverage html
  33. #xdg-open htmlcov/index.html
  34. docs:
  35. #rm -f docs/manutils.rst
  36. #rm -f docs/modules.rst
  37. sphinx-apidoc -o docs/ pwman
  38. $(MAKE) -C docs clean
  39. $(MAKE) -C docs html
  40. open docs/_build/html/index.html
  41. release: clean
  42. python setup.py sdist upload
  43. python setup.py bdist_wheel upload
  44. dist: clean
  45. python setup.py sdist
  46. python setup.py bdist_wheel
  47. ls -l dist
  48. install:
  49. pip uninstall -y pwman3
  50. python setup.py -q install