From 96b5a11d35d74faf7c9866dceef66984dbcddae6 Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Wed, 18 Jul 2018 13:34:08 +0100 Subject: [PATCH] add upper_constraints support - This change enforces the use of upper_constraints in tox envs. Change-Id: I2badb5a3cd5f1ab2a66d3ebd97432b77985ada1b --- tox.ini | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index ab6e3353..c5e6d82b 100644 --- a/tox.ini +++ b/tox.ini @@ -7,9 +7,12 @@ skipsdist = True usedevelop = True install_command = pip install -U {opts} {packages} setenv = - VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt + VIRTUAL_ENV={envdir} + CONSTRAINTS_OPT=-c {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} +deps = + {env:CONSTRAINTS_OPT} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt whitelist_externals = bash commands = stestr run --black-regex ".tests.functional" {posargs} @@ -21,6 +24,7 @@ commands = flake8 basepython = python3 commands = {posargs} deps = + {env:CONSTRAINTS_OPT} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/doc/requirements.txt @@ -34,12 +38,16 @@ commands = [testenv:docs] 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 [testenv:releasenotes] 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 [testenv:lower-constraints]