From 17e3abf320f6d9cd90f7e5a0352280c2fef584af Mon Sep 17 00:00:00 2001 From: Michael Merickel <michael@merickel.org> Date: Mon, 15 Oct 2018 08:15:01 +0200 Subject: [PATCH] add a "tox -e build" for building the distribution --- RELEASING.txt | 15 +++++++++------ tox.ini | 20 ++++++++++++++++++-- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/RELEASING.txt b/RELEASING.txt index 99d077d..ae90a24 100644 --- a/RELEASING.txt +++ b/RELEASING.txt @@ -71,17 +71,20 @@ - Change setup.py version to the release version number. -- Make sure PyPI long description renders (requires ``readme_renderer`` - installed into your Python):: +- Make sure PyPI long description renders:: - $ python setup.py check -r -s -m + $ tox -e lint - Create a release tag. -- Make sure your Python has ``setuptools-git``, ``twine``, and ``wheel`` - installed and release to PyPI:: + $ git tag X.X - $ python setup.py sdist bdist_wheel +- Build the sdist and wheel. + + $ tox -e build + +- Upload the artifacts to PyPI: + $ twine upload dist/pyramid-X.X-* - Configure RTD to publish the new release version of the docs. diff --git a/tox.ini b/tox.ini index aaabcf1..6daa244 100644 --- a/tox.ini +++ b/tox.ini @@ -62,7 +62,7 @@ deps = virtualenv [testenv:lint] -skip_install = True +skip_install = true basepython = python3.5 commands = flake8 pyramid/ @@ -112,7 +112,7 @@ testing [testenv:coverage] -skip_install = True +skip_install = true basepython = python3.5 commands = coverage erase @@ -123,3 +123,19 @@ coverage setenv = COVERAGE_FILE=.coverage + +[testenv:build] +skip_install = true +basepython = python3.6 +commands = + # clean up build/ and dist/ folders + python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)' + python setup.py clean --all + # build sdist + python setup.py sdist --dist-dir {toxinidir}/dist + # build wheel from sdist + pip wheel -v --no-deps --no-index --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist pyramid + +deps = + setuptools + wheel -- Gitblit v1.9.3