Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .PHONY: clean install help test lint isort run dependencies docs wheel upload
  2. .DEFAULT_GOAL := help
  3. help: ## Displays this help message.
  4. @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
  5. dependencies:requirements.txt
  6. @echo "Installing dependencies..."
  7. @pip install -r requirements.txt 1>/dev/null
  8. clean: ## Remove unwanted stuff such as __pycache__, etc...
  9. find . -name '*.pyc' -exec rm -f {} +
  10. find . -name '*.pyo' -exec rm -f {} +
  11. find . -name '*~' -exec rm -f {} +
  12. find . -name '__pycache__' -exec rm -rf {} +
  13. test: ## Runs the testsuite
  14. tox
  15. run: ## Runs the development server with the development config
  16. flaskbb run --debugger --reload
  17. frontend: ## Runs the webpack server which watches for changes in flaskbb/themes/aurora
  18. cd flaskbb/themes/aurora && npm run watch
  19. devconfig:dependencies ## Generates a development config
  20. flaskbb makeconfig -d
  21. install:dependencies ## Installs the dependencies and FlaskBB
  22. flaskbb install
  23. docs: ## Builds the Sphinx docs
  24. $(MAKE) -C docs html
  25. lint: ## Checks the source for style errors
  26. @type flake8 >/dev/null 2>&1 || echo "Flake8 is not installed. You can install it with 'pip install flake8'."
  27. flake8
  28. isort: ## Sorts the python imports
  29. @type isort >/dev/null 2>&1 || echo "isort is not installed. You can install it with 'pip install isort'."
  30. isort --order-by-type -rc -up
  31. dist: ## Creates distribution packages (bdist_wheel, sdist)
  32. python setup.py sdist bdist_wheel
  33. upload:dist ## Uploads a new version of FlaskBB to PyPI
  34. twine upload --skip-existing dist/*