2
0

Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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-contrib:: clean
  32. $(RUNTEST) -v dulwich.contrib.test_suite
  33. check-all: check check-pypy check-noextensions
  34. typing:
  35. mypy dulwich
  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)
  45. before-push: check
  46. git diff origin/master | $(PEP8) --diff
  47. coverage:
  48. $(COVERAGE) run -m unittest dulwich.tests.test_suite dulwich.contrib.test_suite
  49. coverage-html: coverage
  50. $(COVERAGE) html
  51. .PHONY: apidocs
  52. apidocs:
  53. pydoctor --intersphinx http://urllib3.readthedocs.org/en/latest/objects.inv --intersphinx http://docs.python.org/3/objects.inv --docformat=google dulwich --project-url=https://www.dulwich.io/ --project-name=dulwich