2
0

Makefile 1.2 KB

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