From 9c2c1aa831b2e9cd0f2180d1342c7d0d44b89595 Mon Sep 17 00:00:00 2001 From: Tyson Clugg Date: Wed, 16 Dec 2015 22:40:44 +1100 Subject: [PATCH] Test built distributions prior to release. --- MANIFEST.in | 7 +++++-- Makefile | 8 ++++---- tox.ini | 15 +++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 046ad9d..377c556 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,7 +7,10 @@ include .gitignore include Makefile exclude tox.ini graft dddp/test/meteor_todos -graft dddp/test/build -prune docs +prune dddp/test/build +prune dddp/test/meteor_todos/.meteor/local +graft docs +prune docs/_build +prune docs/node_modules exclude .travis.yml.sh exclude .travis.yml diff --git a/Makefile b/Makefile index 6396fa7..91e6e1b 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,10 @@ clean-docs: $(MAKE) -C docs/ clean clean-dist: - rm -f "${SDIST}" "${WHEEL}" + rm -rf "${SDIST}" "${WHEEL}" dddp/test/build/ dddp/test/meteor_todos/.meteor/local/ clean-pyc: - find . -type f -name \*.pyc -print0 | xargs -0 rm + find . -type f -name \*.pyc -print0 | xargs -0 rm -f 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 @@ -33,11 +33,11 @@ dist: ${SDIST} ${WHEEL} ${SDIST}: dist.intermediate @echo "Testing ${SDIST}..." - tox --installpkg ${SDIST} + tox --notest --installpkg ${SDIST} ${WHEEL}: dist.intermediate @echo "Testing ${WHEEL}..." - tox --installpkg ${WHEEL} + tox --notest --installpkg ${WHEEL} dist.intermediate: $(shell find dddp -type f) tox -e dist diff --git a/tox.ini b/tox.ini index 6de5cd3..ae3a0ab 100644 --- a/tox.ini +++ b/tox.ini @@ -118,16 +118,19 @@ deps = [testenv:dist] +install_command=sh -c 'pip install -U "setuptools>=18.5" "wheel>=0.25.0" "pip>=7.1.2" && pip install "$@" && sync' sh {opts} {packages} + +whitelist_externals=sh + commands = check-manifest --ignore "dddp/test/build*,dddp/test/meteor_todos/.meteor/local*" - {envpython} setup.py --quiet --no-user-cfg sdist --dist-dir={toxinidir}/dist/ - {envpython} setup.py --quiet --no-user-cfg bdist_wheel --dist-dir={toxinidir}/dist/ - cd docs && make html - -# the `dist` environment doesn't need our package installed -skip_install=True + {envpython} setup.py --no-user-cfg sdist --dist-dir={toxinidir}/dist/ + {envpython} setup.py --no-user-cfg bdist_wheel --dist-dir={toxinidir}/dist/ + sh -c "cd docs && sphinx-build -b html -d _build/doctrees -D latex_paper_size=a4 . _build/html" +usedevelop=True deps = + -rrequirements.txt -rrequirements-dev.txt check-manifest wheel