Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .PHONY: clean-pyc clean-build docs clean
  2. NOSE_FLAGS=-s --verbosity=2
  3. COVER_CONFIG_FLAGS=--with-coverage --cover-package=rest_framework_bulk --cover-erase
  4. COVER_REPORT_FLAGS=--cover-html --cover-html-dir=htmlcov
  5. COVER_FLAGS=${COVER_CONFIG_FLAGS} ${COVER_REPORT_FLAGS}
  6. help:
  7. @echo "install - install all requirements including for testing"
  8. @echo "install-quite - same as install but pipes all output to /dev/null"
  9. @echo "clean - remove all artifacts"
  10. @echo "clean-build - remove build artifacts"
  11. @echo "clean-pyc - remove Python file artifacts"
  12. @echo "clean-test - remove test and coverage artifacts"
  13. @echo "clean-test-all - remove all test-related artifacts including tox"
  14. @echo "lint - check style with flake8"
  15. @echo "test - run tests quickly with the default Python"
  16. @echo "test-coverage - run tests with coverage report"
  17. @echo "test-all - run tests on every Python version with tox"
  18. @echo "check - run all necessary steps to check validity of project"
  19. @echo "release - package and upload a release"
  20. @echo "dist - package"
  21. install:
  22. pip install -r requirements-dev.txt
  23. install-quite:
  24. pip install -r requirements-dev.txt > /dev/null
  25. clean: clean-build clean-pyc clean-test-all
  26. clean-build:
  27. @rm -rf build/
  28. @rm -rf dist/
  29. @rm -rf *.egg-info
  30. clean-pyc:
  31. -@find . -name '*.pyc' -follow -print0 | xargs -0 rm -f
  32. -@find . -name '*.pyo' -follow -print0 | xargs -0 rm -f
  33. -@find . -name '__pycache__' -type d -follow -print0 | xargs -0 rm -rf
  34. clean-test:
  35. rm -rf .coverage coverage*
  36. rm -rf tests/.coverage test/coverage*
  37. rm -rf htmlcov/
  38. clean-test-all: clean-test
  39. rm -rf .tox/
  40. lint:
  41. flake8 rest_framework_bulk
  42. test:
  43. python tests/manage.py test ${NOSE_FLAGS}
  44. test-coverage:
  45. python tests/manage.py test ${NOSE_FLAGS} ${COVER_FLAGS}
  46. test-all:
  47. tox
  48. check: clean-build clean-pyc clean-test lint test
  49. release: clean
  50. python setup.py sdist upload
  51. dist: clean
  52. python setup.py sdist
  53. ls -l dist