2016-04-11 20:02:34 +00:00
|
|
|
PROJ=kombu
|
2016-07-01 21:13:38 +00:00
|
|
|
PGPIDENT="Celery Security Team"
|
2014-05-27 13:33:11 +00:00
|
|
|
PYTHON=python
|
2016-08-24 02:28:05 +00:00
|
|
|
PYTEST=py.test
|
2016-04-11 20:02:34 +00:00
|
|
|
GIT=git
|
|
|
|
TOX=tox
|
|
|
|
ICONV=iconv
|
2016-10-11 19:33:31 +00:00
|
|
|
PYDOCSTYLE=pydocstyle
|
2016-04-11 20:02:34 +00:00
|
|
|
FLAKE8=flake8
|
|
|
|
FLAKEPLUS=flakeplus
|
2016-04-11 20:17:43 +00:00
|
|
|
SPHINX2RST=sphinx2rst
|
2016-04-11 20:02:34 +00:00
|
|
|
|
2016-08-24 02:28:05 +00:00
|
|
|
TESTDIR=t
|
2016-04-11 20:02:34 +00:00
|
|
|
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-11 20:17:43 +00:00
|
|
|
CONTRIBUTING=CONTRIBUTING.rst
|
|
|
|
CONTRIBUTING_SRC="docs/contributing.rst"
|
|
|
|
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."
|
2016-04-11 20:17:43 +00:00
|
|
|
@echo " readmecheck - Check README.rst encoding."
|
|
|
|
@echo " contribcheck - Check CONTRIBUTING.rst encoding"
|
2016-04-11 20:02:34 +00:00
|
|
|
@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."
|
2016-10-11 19:33:31 +00:00
|
|
|
@echo " pep257check - Run pep257 on the source code."
|
2016-04-11 20:02:34 +00:00
|
|
|
@echo "readme - Regenerate README.rst file."
|
2016-04-11 20:17:43 +00:00
|
|
|
@echo "contrib - Regenerate CONTRIBUTING.rst file"
|
2016-04-11 20:02:34 +00:00
|
|
|
@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."
|
2016-07-01 21:13:38 +00:00
|
|
|
@echo "bump - Bump patch version number."
|
|
|
|
@echo "bump-minor - Bump minor version number."
|
|
|
|
@echo "bump-major - Bump major version number."
|
|
|
|
@echo "release - Make PyPI release."
|
2016-04-11 20:02:34 +00:00
|
|
|
|
|
|
|
clean: clean-docs clean-pyc clean-build
|
|
|
|
|
|
|
|
clean-dist: clean clean-git-force
|
|
|
|
|
2016-07-01 21:13:38 +00:00
|
|
|
bump:
|
|
|
|
bumpversion patch
|
|
|
|
|
|
|
|
bump-minor:
|
|
|
|
bumpversion minor
|
|
|
|
|
|
|
|
bump-major:
|
|
|
|
bumpversion major
|
|
|
|
|
|
|
|
release:
|
|
|
|
python setup.py register sdist bdist_wheel upload --sign --identity="$(PGPIDENT)"
|
|
|
|
|
2016-10-10 18:43:11 +00:00
|
|
|
build-docs:
|
2016-04-08 21:03:29 +00:00
|
|
|
(cd "$(SPHINX_DIR)"; $(MAKE) html)
|
2014-05-27 13:33:11 +00:00
|
|
|
|
2016-10-10 18:43:11 +00:00
|
|
|
Documentation:
|
|
|
|
ln -sf "$(SPHINX_HTMLDIR)" $@
|
|
|
|
|
|
|
|
docs: build-docs Documentation
|
2016-04-11 20:02:34 +00:00
|
|
|
|
|
|
|
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-10-11 19:48:50 +00:00
|
|
|
$(FLAKE8) "$(PROJ)" "$(TESTDIR)"
|
2014-05-27 13:33:11 +00:00
|
|
|
|
|
|
|
flakediag:
|
|
|
|
-$(MAKE) flakecheck
|
|
|
|
|
|
|
|
flakepluscheck:
|
2016-08-24 02:28:05 +00:00
|
|
|
$(FLAKEPLUS) --$(FLAKEPLUSTARGET) "$(PROJ)" "$(TESTDIR)"
|
2014-05-27 13:33:11 +00:00
|
|
|
|
|
|
|
flakeplusdiag:
|
|
|
|
-$(MAKE) flakepluscheck
|
|
|
|
|
2016-10-11 19:33:31 +00:00
|
|
|
pep257check:
|
2016-10-11 20:33:10 +00:00
|
|
|
$(PYDOCSTYLE) "$(PROJ)"
|
2016-10-11 19:33:31 +00:00
|
|
|
|
|
|
|
flakes: flakediag flakeplusdiag pep257check
|
2014-05-27 13:33:11 +00:00
|
|
|
|
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-11 20:17:43 +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:17:43 +00:00
|
|
|
clean-contrib:
|
|
|
|
-rm -f "$(CONTRIBUTING)"
|
|
|
|
|
|
|
|
$(CONTRIBUTING):
|
|
|
|
$(SPHINX2RST) "$(CONTRIBUTING_SRC)" > $@
|
|
|
|
|
|
|
|
contrib: clean-contrib $(CONTRIBUTING)
|
|
|
|
|
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:
|
2016-08-24 02:28:05 +00:00
|
|
|
$(PYTEST) -x --cov=kombu --cov-report=html
|
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:17:43 +00:00
|
|
|
dist: readme contrib clean-dist build
|