Repeatable builds using ye olde make.

This commit is contained in:
Tyson Clugg 2015-10-14 00:28:39 +11:00
parent e0ae6134d1
commit 472d0c10a4
2 changed files with 51 additions and 0 deletions

9
MANIFEST.in Normal file
View file

@ -0,0 +1,9 @@
include LICENSE
include *.rst
include *.sh
include *.txt
include Makefile
recursive-include docs *.bat
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile

42
Makefile Normal file
View file

@ -0,0 +1,42 @@
NAME := $(shell python setup.py --name)
VERSION := $(shell python setup.py --version)
SDIST := dist/${NAME}-${VERSION}.tar.gz
WHEEL := dist/${NAME}-${VERSION}-py2.py3-none-any.whl
.PHONY: all test clean clean-docs upload-docs upload-pypi dist docs
all: docs dist
test:
tox
clean: clean-docs clean-sdist clean-wheel
clean-docs:
$(MAKE) -C docs/ clean
clean-sdist:
rm -f "${SDIST}"
clean-wheel:
rm -f "${WHEEL}"
docs:
$(MAKE) -C docs/ clean html
${SDIST}:
python setup.py sdist
${WHEEL}:
python setup.py bdist_wheel
dist: test ${SDIST} ${WHEEL}
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"