2016-04-02 04:13:57 +03:00
|
|
|
PROJ=celery
|
2014-05-22 17:53:38 +04:00
|
|
|
PYTHON=python
|
2016-04-11 23:15:47 +03:00
|
|
|
GIT=git
|
|
|
|
TOX=tox
|
|
|
|
NOSETESTS=nosetests
|
|
|
|
ICONV=iconv
|
|
|
|
FLAKE8=flake8
|
|
|
|
FLAKEPLUS=flakeplus
|
|
|
|
SPHINX2RST=sphinx2rst
|
|
|
|
|
|
|
|
SPHINX_DIR=docs/
|
2016-04-08 02:01:36 +03:00
|
|
|
SPHINX_BUILDDIR="${SPHINX_DIR}/_build"
|
2016-04-11 23:15:47 +03:00
|
|
|
README=README.rst
|
2014-05-22 17:53:38 +04:00
|
|
|
README_SRC="docs/templates/readme.txt"
|
2016-04-11 23:15:47 +03:00
|
|
|
CONTRIBUTING=CONTRIBUTING.rst
|
2014-05-22 17:53:38 +04:00
|
|
|
CONTRIBUTING_SRC="docs/contributing.rst"
|
2016-04-11 23:15:47 +03:00
|
|
|
SPHINX_HTMLDIR="${SPHINX_BUILDDIR}/html"
|
|
|
|
DOCUMENTATION=Documentation
|
|
|
|
FLAKEPLUSTARGET=2.7
|
|
|
|
|
|
|
|
WORKER_GRAPH="docs/images/worker_graph_full.png"
|
|
|
|
|
|
|
|
all: help
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "docs - Build documentation."
|
|
|
|
@echo "test-all - Run tests for all supported python versions."
|
|
|
|
@echo "distcheck ---------- - Check distribution for problems."
|
|
|
|
@echo " test - Run unittests using current python."
|
|
|
|
@echo " lint ------------ - Check codebase for problems."
|
|
|
|
@echo " apicheck - Check API reference coverage."
|
|
|
|
@echo " configcheck - Check configuration reference coverage."
|
|
|
|
@echo " readmecheck - Check README.rst encoding."
|
|
|
|
@echo " contribcheck - Check CONTRIBUTING.rst encoding"
|
|
|
|
@echo " flakes -------- - Check code for syntax and style errors."
|
|
|
|
@echo " flakecheck - Run flake8 on the source code."
|
|
|
|
@echo " flakepluscheck - Run flakeplus on the source code."
|
|
|
|
@echo "readme - Regenerate README.rst file."
|
|
|
|
@echo "contrib - Regenerate CONTRIBUTING.rst file"
|
|
|
|
@echo "clean-dist --------- - Clean all distribution build artifacts."
|
|
|
|
@echo " clean-git-force - Remove all uncomitted files."
|
|
|
|
@echo " clean ------------ - Non-destructive clean"
|
|
|
|
@echo " clean-pyc - Remove .pyc/__pycache__ files"
|
|
|
|
@echo " clean-docs - Remove documentation build artifacts."
|
|
|
|
@echo " clean-build - Remove setup artifacts."
|
|
|
|
|
|
|
|
clean: clean-docs clean-pyc clean-build
|
|
|
|
|
|
|
|
clean-dist: clean clean-git-force
|
|
|
|
|
|
|
|
Documentation:
|
2016-04-08 23:47:09 +03:00
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) html)
|
2016-04-11 23:15:47 +03:00
|
|
|
mv "$(SPHINX_HTMLDIR)" $(DOCUMENTATION)
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
docs: Documentation
|
|
|
|
|
|
|
|
clean-docs:
|
2014-05-22 17:53:38 +04:00
|
|
|
-rm -rf "$(SPHINX_BUILDDIR)"
|
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
lint: flakecheck apicheck configcheck readmecheck
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
apicheck:
|
2016-04-08 23:47:09 +03:00
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) apicheck)
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
configcheck:
|
2016-04-09 02:11:41 +03:00
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) configcheck)
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
flakecheck:
|
2016-05-27 03:28:13 +03:00
|
|
|
# the only way to enable all-1 errors is to ignore one of them.
|
|
|
|
$(FLAKE8) --ignore=W503 "$(PROJ)"
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
flakediag:
|
|
|
|
-$(MAKE) flakecheck
|
|
|
|
|
|
|
|
flakepluscheck:
|
2016-04-11 23:15:47 +03:00
|
|
|
$(FLAKEPLUS) --$(FLAKEPLUSTARGET) "$(PROJ)"
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
flakeplusdiag:
|
|
|
|
-$(MAKE) flakepluscheck
|
|
|
|
|
|
|
|
flakes: flakediag flakeplusdiag
|
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
clean-readme:
|
2014-05-22 17:53:38 +04:00
|
|
|
-rm -f $(README)
|
|
|
|
|
|
|
|
readmecheck:
|
2016-04-11 23:15:47 +03:00
|
|
|
$(ICONV) -f ascii -t ascii $(README) >/dev/null
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
$(README):
|
2016-04-11 23:15:47 +03:00
|
|
|
$(SPHINX2RST) "$(README_SRC)" --ascii > $@
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
readme: clean-readme $(README) readmecheck
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
clean-contrib:
|
|
|
|
-rm -f "$(CONTRIBUTING)"
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
$(CONTRIBUTING):
|
2016-04-11 23:15:47 +03:00
|
|
|
$(SPHINX2RST) "$(CONTRIBUTING_SRC)" > $@
|
|
|
|
|
|
|
|
contrib: clean-contrib $(CONTRIBUTING)
|
|
|
|
|
|
|
|
clean-pyc:
|
|
|
|
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
|
|
|
|
-find . -type d -name "__pycache__" | xargs rm -r
|
|
|
|
|
|
|
|
removepyc: clean-pyc
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
clean-build:
|
|
|
|
rm -rf build/ dist/ .eggs/ *.egg-info/ .tox/ .coverage cover/
|
|
|
|
|
|
|
|
clean-git:
|
|
|
|
$(GIT) clean -xdn
|
|
|
|
|
|
|
|
clean-git-force:
|
|
|
|
$(GIT) clean -xdf
|
|
|
|
|
|
|
|
test-all: clean-pyc
|
|
|
|
$(TOX)
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
test:
|
2016-04-11 23:15:47 +03:00
|
|
|
$(PYTHON) setup.py test
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
cov:
|
2016-04-11 23:15:47 +03:00
|
|
|
$(NOSETESTS) -xv --with-coverage --cover-html --cover-branch
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
build:
|
|
|
|
$(PYTHON) setup.py sdist bdist_wheel
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
distcheck: lint test clean
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
dist: readme contrib clean-dist build
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
$(WORKER_GRAPH):
|
|
|
|
$(PYTHON) -m celery graph bootsteps | dot -Tpng -o $@
|
2014-05-22 17:53:38 +04:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
clean-graph:
|
|
|
|
-rm -f $(WORKER_GRAPH)
|
2016-04-08 23:47:09 +03:00
|
|
|
|
2016-04-11 23:15:47 +03:00
|
|
|
graph: clean-graph $(WORKER_GRAPH)
|
2014-05-22 17:53:38 +04:00
|
|
|
|
|
|
|
authorcheck:
|
|
|
|
git shortlog -se | cut -f2 | extra/release/attribution.py
|
|
|
|
|