Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. PYTHON = python3
  2. PYFLAKES = $(PYTHON) -m pyflakes
  3. PEP8 = pep8
  4. FLAKE8 ?= $(PYTHON) -m 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. typing:
  33. mypy dulwich
  34. clean::
  35. $(SETUP) clean --all
  36. rm -f dulwich/*.so
  37. flakes:
  38. $(PYFLAKES) dulwich
  39. pep8:
  40. $(PEP8) dulwich
  41. style:
  42. $(FLAKE8)
  43. before-push: check
  44. git diff origin/master | $(PEP8) --diff
  45. coverage:
  46. $(COVERAGE) run -m unittest dulwich.tests.test_suite dulwich.contrib.test_suite
  47. coverage-html: coverage
  48. $(COVERAGE) html
  49. .PHONY: apidocs
  50. apidocs:
  51. pydoctor --docformat=google dulwich --project-url=https://www.dulwich.io/