2
0

Makefile 1.2 KB

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