Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. .PHONY: clean install help test lint run dependencies docs
  2. help:
  3. @echo " clean remove unwanted stuff"
  4. @echo " install install dependencies and flaskbb"
  5. @echo " devconfig generates a development config"
  6. @echo " test run the testsuite"
  7. @echo " lint check the source for style errors"
  8. @echo " run run the development server with the development config"
  9. @echo " docs build the documentation"
  10. dependencies:requirements.txt
  11. @echo "Installing dependencies..."
  12. @pip install -r requirements.txt 1>/dev/null
  13. clean:
  14. find . -name '*.pyc' -exec rm -f {} +
  15. find . -name '*.pyo' -exec rm -f {} +
  16. find . -name '*~' -exec rm -f {} +
  17. find . -name '__pycache__' -exec rm -rf {} +
  18. test:
  19. py.test
  20. run:
  21. flaskbb run --debugger --reload
  22. devconfig:dependencies
  23. flaskbb makeconfig -d
  24. install:dependencies
  25. @[ -f ./flaskbb.cfg ] || (echo "flaskbb.cfg not found. You can generate a configuration file with 'flaskbb makeconfig'."; exit 1)
  26. flaskbb --config ./flaskbb.cfg install
  27. docs:
  28. $(MAKE) -C docs html
  29. lint:check
  30. flake8
  31. check:
  32. @type flake8 >/dev/null 2>&1 || echo "Flake8 is not installed. You can install it with 'pip install flake8'."