1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Makefile for testing
  2. TESTPYPI = pypitest
  3. PYPI = pypi
  4. .PHONY: dogfood lint doc-check doc-preview clean build dist-test dist \
  5. test test3 cov cov3 html reg reg3 profile profile3
  6. dogfood:
  7. ./ydiff.py
  8. git diff | ./ydiff.py -s
  9. lint:
  10. pep8 --ignore=E203 *.py tests/*.py
  11. doc-check:
  12. ./setup.py --long-description | rst2html.py --strict > /dev/null
  13. doc-preview:
  14. ./setup.py --long-description | rst2html.py --strict > output.html
  15. python -m webbrowser -n "file://$(shell pwd)/output.html"
  16. sleep 1
  17. rm -f output.html
  18. test: lint doc-check cov reg
  19. test3: lint doc-check cov3 reg3
  20. cov:
  21. coverage run tests/test_ydiff.py
  22. coverage report --show-missing
  23. cov3:
  24. python3 `which coverage` run tests/test_ydiff.py
  25. python3 `which coverage` report --show-missing
  26. html:
  27. coverage html
  28. python -m webbrowser -n "file://$(shell pwd)/htmlcov/index.html"
  29. reg:
  30. tests/regression.sh
  31. reg3:
  32. PYTHON=python3 tests/regression.sh
  33. profile:
  34. tests/profile.sh profile.tmp
  35. profile3:
  36. tests/profile.sh profile3.tmp
  37. clean:
  38. rm -f MANIFEST profile*.tmp* .coverage
  39. rm -rf build/ ydiff.egg-info/ dist/ __pycache__/ htmlcov/
  40. build:
  41. ./setup.py build sdist
  42. dist-test: clean build
  43. twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  44. rm -f ~/.pypirc
  45. dist: clean build
  46. twine upload dist/*
  47. rm -f ~/.pypirc
  48. # vim:set noet ts=8 sw=8: