add upper_constraints support

- This change enforces the use of upper_constraints
  in tox envs.

Change-Id: I2badb5a3cd5f1ab2a66d3ebd97432b77985ada1b
This commit is contained in:
Sean Mooney 2018-07-18 13:34:08 +01:00 committed by Stephen Finucane
parent 9679783616
commit 96b5a11d35

18
tox.ini
View File

@ -7,9 +7,12 @@ skipsdist = True
usedevelop = True usedevelop = True
install_command = pip install -U {opts} {packages} install_command = pip install -U {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt CONSTRAINTS_OPT=-c {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = bash whitelist_externals = bash
commands = stestr run --black-regex ".tests.functional" {posargs} commands = stestr run --black-regex ".tests.functional" {posargs}
@ -21,6 +24,7 @@ commands = flake8
basepython = python3 basepython = python3
commands = {posargs} commands = {posargs}
deps = deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
@ -34,12 +38,16 @@ commands =
[testenv:docs] [testenv:docs]
basepython = python3 basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W doc/source doc/build commands = sphinx-build -W doc/source doc/build
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3 basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints] [testenv:lower-constraints]