Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. REQUIREMENTS_FILE=dev-requirements.txt
  2. REQUIREMENTS_OUT=dev-requirements.txt.log
  3. SETUP_OUT=*.egg-info
  4. .PHONY: all
  5. all: setup requirements
  6. .PHONY: virtualenv
  7. virtualenv:
  8. ifndef VIRTUAL_ENV
  9. $(error Must be run inside of a virtualenv)
  10. endif
  11. .PHONY: setup
  12. setup: virtualenv $(SETUP_OUT)
  13. .PHONY: $(SETUP_OUT)
  14. $(SETUP_OUT): setup.py setup.cfg
  15. python setup.py develop
  16. touch $(SETUP_OUT)
  17. .PHONY: requirements
  18. requirements: setup $(REQUIREMENTS_OUT)
  19. .PHONY: piprot
  20. piprot: setup
  21. pip install piprot
  22. piprot -x $(REQUIREMENTS_FILE)
  23. .PHONY: $(REQUIREMENTS_OUT)
  24. $(REQUIREMENTS_OUT): $(REQUIREMENTS_FILE)
  25. pip install -r $(REQUIREMENTS_FILE) | tee -a $(REQUIREMENTS_OUT)
  26. python setup.py develop
  27. .PHONY: clean
  28. clean:
  29. find . -name "*.py[oc]" -delete
  30. find . -name "__pycache__" -delete
  31. rm -f $(REQUIREMENTS_OUT)
  32. rm -rf docs/_build build/ dist/
  33. .PHONY: test
  34. test: requirements
  35. nosetests
  36. .PHONY: test-all
  37. test-all: requirements
  38. tox
  39. .PHONY: test-gae
  40. test-gae: requirements
  41. ifndef GAE_PYTHONPATH
  42. $(error GAE_PYTHONPATH must be set)
  43. endif
  44. tox -e gae
  45. .PHONY: docs
  46. docs:
  47. tox -e docs
  48. .PHONY: release
  49. release:
  50. ./release.sh