Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. .PHONY: clean clean-build clean-pyc clean-test docs qa lint coverage jslint qa-all install-jslint test test-all coverage-console release sdist
  2. help:
  3. @echo "clean - remove all artifacts"
  4. @echo "clean-build - remove build artifacts"
  5. @echo "clean-pyc - remove Python file artifacts"
  6. @echo "clean-test - remove test and coverage artifacts"
  7. @echo "coverage - check code coverage quickly with the default Python"
  8. @echo "docs - generate Sphinx HTML documentation"
  9. @echo "lint - check style with flake8"
  10. @echo "qa - run linters and test coverage"
  11. @echo "qa-all - run QA plus tox and packaging"
  12. @echo "release - package and upload a release"
  13. @echo "sdist - package"
  14. @echo "test - run tests quickly with the default Python"
  15. @echo "test-all - run tests on every Python version with tox"
  16. @echo "test-release - upload a release to the PyPI test server"
  17. clean: clean-build clean-pyc clean-test
  18. qa: lint coverage
  19. qa-all: qa sdist test-all
  20. clean-build:
  21. rm -fr build/
  22. rm -fr dist/
  23. rm -fr *.egg-info
  24. clean-pyc:
  25. find . \( -name \*.pyc -o -name \*.pyo -o -name __pycache__ \) -delete
  26. find . -name '*~' -delete
  27. clean-test:
  28. rm -fr .tox/
  29. rm -f .coverage
  30. rm -fr htmlcov/
  31. docs:
  32. $(MAKE) -C docs clean
  33. $(MAKE) -C docs html
  34. open docs/_build/html/index.html
  35. lint:
  36. flake8 .
  37. test:
  38. ./manage.py test
  39. test-all:
  40. COVERAGE=1 tox --skip-missing-interpreters
  41. coverage-console:
  42. coverage erase
  43. COVERAGE=1 ./runtests.sh
  44. coverage combine
  45. coverage report -m
  46. coverage: coverage-console
  47. coverage html
  48. open htmlcov/index.html
  49. release: sdist
  50. twine upload dist/*
  51. python -m webbrowser -n https://pypi.python.org/pypi/django-nose
  52. # Add [test] section to ~/.pypirc, https://test.pypi.org/legacy/
  53. test-release: sdist
  54. twine upload --repository test dist/*
  55. python -m webbrowser -n https://testpypi.python.org/pypi/django-nose
  56. sdist: clean
  57. python setup.py sdist bdist_wheel
  58. ls -l dist
  59. check-manifest
  60. pyroma dist/`ls -t dist | grep tar.gz | head -n1`