4e53cdb5aa
Using "python setup.py check -r -s" method of checking the package has been deprecated with the new recommendation to build the sdist and wheel, then running "twine check" against the output. Luckily, there is already a job that covers this that only runs when the README, setup.py, or setup.cfg files change, making running this in the pep8 job redundant. This covered by the test-release-openstack-python3 that is defined in the publish-to-pypi-python3 template. More details can be found in this mailing list post: http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html Change-Id: I7c17371b9f43c50bf07a460e1a3a731bf6d6a793 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
108 lines
3.1 KiB
INI
108 lines
3.1 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = pep8
|
|
|
|
[testenv]
|
|
usedevelop = False
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
sitepackages = False
|
|
whitelist_externals =
|
|
rm
|
|
make
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands =
|
|
flake8 openstackdocstheme
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands =
|
|
rm -rf doc/build api-ref/build
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
|
|
|
[testenv:docs-starlingxdocs]
|
|
basepython = python3
|
|
commands =
|
|
rm -rf doc/build api-ref/build
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b html -D html_theme=starlingxdocs doc/source doc/build/html
|
|
|
|
[testenv:html]
|
|
commands =
|
|
rm -rf doc/build api-ref/build
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
|
sphinx-build -a -E -W -d api-ref/build/doctrees -b html api-ref/source api-ref/build/html
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:releasenotes-starlingxdocs]
|
|
basepython = python3
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html -D html_theme=starlingxdocs releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:api-ref]
|
|
basepython = python3
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -a -E -W -d api-ref/build/doctrees -b html api-ref/source api-ref/build/html
|
|
|
|
[testenv:api-ref-starlingxdocs]
|
|
basepython = python3
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -a -E -W -d api-ref/build/doctrees -b html -D html_theme=starlingxdocs api-ref/source api-ref/build/html
|
|
|
|
[testenv:buildpdf]
|
|
# Only build PDF and push it to publish-docs folder so that OpenStack
|
|
# CI jobs will publish it.
|
|
whitelist_externals =
|
|
make
|
|
cp
|
|
mkdir
|
|
commands =
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
mkdir -p publish-docs
|
|
cp doc/build/pdf/os-doc-demo.pdf publish-docs
|
|
|
|
[testenv:buildpdf-starlingxdocs]
|
|
# Only build PDF and push it to publish-docs folder so that OpenStack
|
|
# CI jobs will publish it.
|
|
whitelist_externals =
|
|
make
|
|
cp
|
|
mkdir
|
|
commands =
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b latex -D html_theme=starlingxdocs doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
mkdir -p publish-docs
|
|
cp doc/build/pdf/os-doc-demo.pdf publish-docs
|
|
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files.
|
|
basepython = python3
|
|
deps = bindep
|
|
commands = bindep test
|
|
|
|
[flake8]
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
|
|
show-source = True
|
|
enable-extensions = H203,H106
|