2
0

Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. PYTHON = python -Werror
  2. PYFLAKES = pyflakes
  3. PEP8 = pep8
  4. FLAKE8 ?= flake8
  5. SETUP = $(PYTHON) setup.py
  6. PYDOCTOR ?= pydoctor
  7. TESTRUNNER ?= unittest
  8. RUNTEST = PYTHONHASHSEED=random PYTHONPATH=.:$(PYTHONPATH) $(PYTHON) -m $(TESTRUNNER) $(TEST_OPTIONS)
  9. COVERAGE = python3-coverage
  10. DESTDIR=/
  11. all: build
  12. doc:: pydoctor
  13. doc:: sphinx
  14. sphinx::
  15. $(MAKE) -C docs html
  16. pydoctor::
  17. $(PYDOCTOR) --make-html -c dulwich.cfg
  18. build::
  19. $(SETUP) build
  20. $(SETUP) build_ext -i
  21. install::
  22. $(SETUP) install --root="$(DESTDIR)"
  23. check:: build
  24. $(RUNTEST) dulwich.tests.test_suite
  25. check-tutorial:: build
  26. $(RUNTEST) dulwich.tests.tutorial_test_suite
  27. check-nocompat:: build
  28. $(RUNTEST) dulwich.tests.nocompat_test_suite
  29. check-compat:: build
  30. $(RUNTEST) dulwich.tests.compat_test_suite
  31. check-pypy:: clean
  32. $(MAKE) check-noextensions PYTHON=pypy
  33. check-noextensions:: clean
  34. $(RUNTEST) dulwich.tests.test_suite
  35. check-all: check check-pypy check-noextensions
  36. clean::
  37. $(SETUP) clean --all
  38. rm -f dulwich/*.so
  39. flakes:
  40. $(PYFLAKES) dulwich
  41. pep8:
  42. $(PEP8) dulwich
  43. style:
  44. $(FLAKE8) --exclude=build,.git,build-pypy,.tox
  45. before-push: check
  46. git diff origin/master | $(PEP8) --diff
  47. coverage:
  48. $(COVERAGE) run --source=dulwich -m unittest dulwich.tests.test_suite dulwich.contrib.test_suite
  49. coverage-html: coverage
  50. $(COVERAGE) html