[travis/tox] check syntax of reStructuredText before release

I pushed a NEWS.rst with broken indentation, the PyPI page will
display plan text garbage.

Next time I'll use docutils and do `python setup.py check
--restructuredtext` before pushing a new tag.

Also, I forgot to update .travis.yml to build the dist packages
on python3.6 instead of 3.5 after I modified the tox.ini, so
the automatic release from Travis failed.

This time I had to use twine tool to upload the zip and whl
packages from my local machine to PyPI.

Sorry the mess...
This commit is contained in:
Cosimo Lupo 2017-11-21 13:04:12 +01:00
parent f419d44512
commit 189d158887
3 changed files with 10 additions and 6 deletions

View File

@ -10,11 +10,11 @@ matrix:
- python: 3.4
env: TOXENV=py34-cov
- python: 3.5
env:
- TOXENV=py35-cov
- BUILD_DIST=true
env: TOXENV=py35-cov
- python: 3.6
env: TOXENV=py36-cov
env:
- TOXENV=py36-cov
- BUILD_DIST=true
- python: pypy2.7-5.8.0
# disable coverage.py on pypy because of performance problems
env: TOXENV=pypy-nocov

View File

@ -46,6 +46,8 @@ commands =
[testenv:bdist]
basepython = {env:TOXPYTHON:python3.6}
deps =
pygments
docutils
setuptools
wheel
skip_install = true
@ -55,6 +57,8 @@ install_command =
whitelist_externals =
rm
commands =
# check metadata and rst long_description
python setup.py check --restructuredtext --strict
# clean up build/ and dist/ folders
rm -rf {toxinidir}/dist
python setup.py clean --all