django-ddp/Makefile
Tyson Clugg d7dde53bdc Packaging updates in preparation for next release.
- `make test` runs tox against Python 2.7/3.3/3.4/3.5 and Django
  1.8/1.9.
- Building universal wheels with PEP-0496 Environment Markers.
- Build wheel from tox environment to ensure consistency.
- Consistent layout for setup and requirements files, now using PEP-0409
  Environment Markers.
- Dropping support for Django 1.7 (didn't work anyway).
- Moving repository to https://github.com/django-ddp/django-ddp (new
  Github organisation).
- Update changelog.
2015-12-14 13:05:28 +11:00

54 lines
1.3 KiB
Makefile

NAME := $(shell python setup.py --name)
VERSION := $(shell python setup.py --version)
SDIST := dist/${NAME}-${VERSION}.tar.gz
WHEEL := dist/$(subst -,_,${NAME})-${VERSION}-py2.py3-none-any.whl
.PHONY: all test clean clean-docs clean-dist upload-docs upload-pypi dist
.INTERMEDIATE: dist.intermediate docs
all: .travis.yml docs dist
test:
tox -vvv
clean: clean-docs clean-dist clean-pyc
clean-docs:
$(MAKE) -C docs/ clean
clean-dist:
rm -f "${SDIST}" "${WHEEL}"
clean-pyc:
find . -type f -name \*.pyc -print0 | xargs -0 rm
docs: $(shell find docs/ -type f -name \*.rst) docs/conf.py docs/Makefile $(shell find docs/_static/ -type f) $(shell find docs/_templates/ -type f) README.rst CHANGES.rst
$(MAKE) -C docs/ clean html
touch "$@"
dist: ${SDIST} ${WHEEL}
@echo 'Build successful, `${MAKE} upload` when ready to release.'
${SDIST}: dist.intermediate
@echo "Testing ${SDIST}..."
tox --installpkg ${SDIST}
${WHEEL}: dist.intermediate
@echo "Testing ${WHEEL}..."
tox --installpkg ${WHEEL}
dist.intermediate: $(shell find dddp -type f)
tox -e dist
upload: upload-pypi upload-docs
upload-pypi: ${SDIST} ${WHEEL}
twine upload "${WHEEL}" "${SDIST}"
upload-docs: docs/_build/
python setup.py upload_sphinx --upload-dir="$<html"
.travis.yml: tox.ini .travis.yml.sh
sh .travis.yml.sh > "$@"