2016-04-11 20:02:34 +00:00
|
|
|
PROJ=kombu
|
2014-05-27 13:33:11 +00:00
|
|
|
PYTHON=python
|
2016-04-11 20:02:34 +00:00
|
|
|
GIT=git
|
|
|
|
TOX=tox
|
|
|
|
NOSETESTS=nosetests
|
|
|
|
ICONV=iconv
|
|
|
|
FLAKE8=flake8
|
|
|
|
FLAKEPLUS=flakeplus
|
|
|
|
|
|
|
|
SPHINX_DIR=docs/
|
2016-04-07 22:59:26 +00:00
|
|
|
SPHINX_BUILDDIR="${SPHINX_DIR}/_build"
|
2016-04-11 20:02:34 +00:00
|
|
|
README=README.rst
|
2014-05-27 13:33:11 +00:00
|
|
|
README_SRC="docs/templates/readme.txt"
|
2016-04-08 01:51:22 +00:00
|
|
|
SPHINX2RST="sphinx2rst"
|
2014-05-27 13:33:11 +00:00
|
|
|
SPHINX_HTMLDIR = "${SPHINX_BUILDDIR}/html"
|
2016-04-11 20:02:34 +00:00
|
|
|
DOCUMENTATION=Documentation
|
|
|
|
FLAKEPLUSTARGET=2.7
|
|
|
|
|
|
|
|
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 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 "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 21:03:29 +00:00
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) html)
|
2016-04-11 20:02:34 +00:00
|
|
|
mv "$(SPHINX_HTMLDIR)" $(DOCUMENTATION)
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
docs: Documentation
|
|
|
|
|
|
|
|
clean-docs:
|
2014-05-27 13:33:11 +00:00
|
|
|
-rm -rf "$(SPHINX_BUILDDIR)"
|
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
lint: flakecheck apicheck configcheck readmecheck
|
2014-05-27 13:33:11 +00:00
|
|
|
|
|
|
|
apicheck:
|
2016-04-08 21:03:29 +00:00
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) apicheck)
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
configcheck:
|
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) configcheck)
|
|
|
|
|
2014-05-27 13:33:11 +00:00
|
|
|
flakecheck:
|
2016-04-11 20:02:34 +00:00
|
|
|
$(FLAKE8) "$(PROJ)"
|
2014-05-27 13:33:11 +00:00
|
|
|
|
|
|
|
flakediag:
|
|
|
|
-$(MAKE) flakecheck
|
|
|
|
|
|
|
|
flakepluscheck:
|
2016-04-11 20:02:34 +00:00
|
|
|
$(FLAKEPLUS) --$(FLAKEPLUSTARGET) "$(PROJ)"
|
2014-05-27 13:33:11 +00:00
|
|
|
|
|
|
|
flakeplusdiag:
|
|
|
|
-$(MAKE) flakepluscheck
|
|
|
|
|
|
|
|
flakes: flakediag flakeplusdiag
|
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
clean-readme:
|
2014-05-27 13:33:11 +00:00
|
|
|
-rm -f $(README)
|
|
|
|
|
|
|
|
readmecheck:
|
2016-04-11 20:02:34 +00:00
|
|
|
$(ICONV) -f ascii -t ascii $(README) >/dev/null
|
2014-05-27 13:33:11 +00:00
|
|
|
|
|
|
|
$(README):
|
2016-04-08 01:51:22 +00:00
|
|
|
$(SPHINX2RST) $(README_SRC) --ascii > $@
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
readme: clean-readme $(README) readmecheck
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
clean-pyc:
|
2014-05-27 13:33:11 +00:00
|
|
|
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
|
|
|
|
-find . -type d -name "__pycache__" | xargs rm -r
|
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
removepyc: clean-pyc
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00: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)
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(PYTHON) setup.py test
|
|
|
|
|
|
|
|
cov:
|
|
|
|
$(NOSETESTS) -xv --with-coverage --cover-html --cover-branch
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
build:
|
|
|
|
$(PYTHON) setup.py sdist bdist_wheel
|
2016-04-08 21:03:29 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
distcheck: lint test clean
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-04-11 20:02:34 +00:00
|
|
|
dist: readme clean-dist build
|