openstackdocstheme/tox.ini
Tony Breeds edec81e740 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove openstackdocstheme.

Change-Id: I4ed268e3fec3754a4344c57509ff6969406335ad
2016-12-21 12:01:20 +11:00

49 lines
1.4 KiB
INI

[tox]
minversion = 2.0
envlist = pep8
[testenv]
usedevelop = False
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
setenv = VIRTUAL_ENV={envdir}
BRANCH_NAME=master
CLIENT_NAME=openstackdocstheme
sitepackages = False
whitelist_externals = rm
[testenv:pep8]
commands =
flake8 openstackdocstheme
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands =
rm -rf doc/build api-ref/build
python setup.py build_sphinx
sphinx-build -a -E -W -d api-ref/build/doctrees -b html api-ref/source api-ref/build/html
[testenv:releasenotes]
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:api-ref]
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: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.
deps = bindep
commands = bindep test
[flake8]
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
show-source = True