Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .PHONY: clean install help test lint isort run dependencies docs wheel upload
  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 " isort sort the python imports"
  9. @echo " run run the development server with the development config"
  10. @echo " wheel creates a wheel package of flaskbb"
  11. @echo " upload uploads a new version of FlaskBB to PyPI"
  12. @echo " docs build the documentation"
  13. dependencies:requirements.txt
  14. @echo "Installing dependencies..."
  15. @pip install -r requirements.txt 1>/dev/null
  16. clean:
  17. find . -name '*.pyc' -exec rm -f {} +
  18. find . -name '*.pyo' -exec rm -f {} +
  19. find . -name '*~' -exec rm -f {} +
  20. find . -name '__pycache__' -exec rm -rf {} +
  21. test:
  22. tox
  23. run:
  24. flaskbb run --debugger --reload
  25. devconfig:dependencies
  26. flaskbb makeconfig -d
  27. install:dependencies
  28. @[ -f ./flaskbb.cfg ] || (echo "flaskbb.cfg not found. You can generate a configuration file with 'flaskbb makeconfig'."; exit 1)
  29. flaskbb --config ./flaskbb.cfg install
  30. docs:
  31. $(MAKE) -C docs html
  32. lint:check-flake8
  33. flake8
  34. check-flake8:
  35. @type flake8 >/dev/null 2>&1 || echo "Flake8 is not installed. You can install it with 'pip install flake8'."
  36. isort:check-isort
  37. isort --order-by-type -rc -up
  38. check-isort:
  39. @type isort >/dev/null 2>&1 || echo "isort is not installed. You can install it with 'pip install isort'."
  40. wheel:
  41. python setup.py bdist_wheel
  42. upload:wheel
  43. twine upload dist/*