From: Jeremy Stanley Date: Sun, 8 Jul 2018 19:12:12 +0000 (+0000) Subject: Check readme suitability for PyPI X-Git-Tag: 0.0.1~72 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=86201aa182af5649868a85e3f331c0f2886c5acb Check readme suitability for PyPI When generating sdists and wheels with the testenv:dist env in tox, first run a check of the readme to make sure its contents will be correctly parsed by PyPI/Warehouse. Also add dist to the set of default envs and stop excluding the dist directory it creates from testenv:flake8 runs since it shouldn't contain anything problematic anyway. Clean up an unused VIRTUAL_ENV assignment in the tox.ini too. Update the Coder Guide with the simpler tox invocation while we're at it. --- diff --git a/doc/source/coder.rst b/doc/source/coder.rst index 1104bca..5a86659 100644 --- a/doc/source/coder.rst +++ b/doc/source/coder.rst @@ -29,9 +29,9 @@ presentation and discussion of patches soon. A :file:`ChangeLog` is generated automatically from repository commit logs, and is included automatically in all sdist_ tarballs. It -can be regenerated easily by running :command:`tox -e venv python -setup.py sdist` from the top level directory of the Git repository in -a working `developer environment`_. +can be regenerated easily by running :command:`tox -e dist` from the +top level directory of the Git repository in a working `developer +environment`_. .. _Git: https://git-scm.com/ .. _sdist: https://packaging.python.org/glossary diff --git a/tox.ini b/tox.ini index db369e3..5b84bb3 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ [tox] minversion = 2.0 -envlist = flake8, yamllint +envlist = dist, flake8, yamllint skipsdist = True [testenv] @@ -12,16 +12,18 @@ basepython = python3 usedevelop = True install_command = pip install {opts} {packages} setenv = - VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning deps = -r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:dist] whitelist_externals = rm -deps = pbr +deps = + docutils + pbr commands = rm -fr dist + python setup.py check --restructuredtext --strict python setup.py bdist_wheel sdist [testenv:docs] @@ -42,4 +44,4 @@ commands = {posargs} [flake8] show-source = True -exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build +exclude=.venv,.git,.tox,doc,*lib/python*,*egg,build