2
0

Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. PYTHON = python
  2. PYFLAKES = pyflakes
  3. PEP8 = pep8
  4. SETUP = $(PYTHON) setup.py
  5. PYDOCTOR ?= pydoctor
  6. ifeq ($(shell $(PYTHON) -c "import sys; print(sys.version_info >= (2, 7))"),True)
  7. TESTRUNNER ?= unittest
  8. else
  9. TESTRUNNER ?= unittest2.__main__
  10. endif
  11. RUNTEST = PYTHONHASHSEED=random PYTHONPATH=.:$(PYTHONPATH) $(PYTHON) -m $(TESTRUNNER) $(TEST_OPTIONS)
  12. DESTDIR=/
  13. all: build
  14. doc:: pydoctor
  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