diff --git a/tools/pip_install.sh b/tools/pip_install.sh index 7596c16..c7568eb 100755 --- a/tools/pip_install.sh +++ b/tools/pip_install.sh @@ -21,11 +21,7 @@ horizon_installed=$(echo "import horizon" | python 2>/dev/null ; echo $?) set -e -install_cmd="pip install" -if [ "$1" = "constrained" ]; then - install_cmd="$install_cmd $2" - shift -fi +install_cmd="pip install $1" shift if [ $horizon_installed -eq 0 ]; then diff --git a/tox.ini b/tox.ini index aafe228..2499a3d 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,9 @@ skipsdist = True [testenv] usedevelop = True -install_command = {toxinidir}/tools/pip_install.sh unconstrained {opts} {packages} +install_command = {toxinidir}/tools/pip_install.sh \ + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \ + {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt @@ -20,7 +22,9 @@ commands = flake8 [testenv:venv] # This target does not use script since we do not need to install horizon. -install_command = pip install -U --force-reinstall {opts} {packages} +install_command = pip install \ + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \ + -U --force-reinstall {opts} {packages} commands = {posargs} # Django-1.8 is LTS