Use upper-constraints for requirements' versions

Related-Bug: #1563028

Change-Id: I4bfc5222ef76ba1934da29b86f623ba7dc201fea
This commit is contained in:
Robert Kukura 2016-03-29 15:55:46 -04:00
parent ade374bd48
commit 8cc152f965
3 changed files with 49 additions and 3 deletions

View File

@ -5,8 +5,6 @@
setuptools>=19.2
-e git+https://git.openstack.org/openstack/neutron.git@stable/mitaka#egg=neutron
-e git+https://github.com/noironetworks/apic-ml2-driver.git@master#egg=apic_ml2
-e git+https://git.openstack.org/openstack/python-heatclient@stable/mitaka#egg=heatclient
-e git+https://git.openstack.org/openstack/python-keystoneclient@stable/mitaka#egg=keystoneclient
hacking<0.11,>=0.10.0
cliff>=1.15.0 # Apache-2.0
@ -30,4 +28,10 @@ ddt>=1.0.1 # MIT
pylint==1.4.5 # GNU GPL v2
reno>=0.1.1 # Apache2
# Since version numbers for these are specified in
# https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt,
# they cannot be refernced as GIT URLs
python-heatclient
python-keystoneclient
-e git+https://github.com/noironetworks/python-opflex-agent.git@sumit/mitaka-sync#egg=python-opflexagent-agent

41
tools/tox_install.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/bash
# Many of neutron's repos suffer from the problem of depending on neutron,
# but it not existing on pypi. -- Well, that's the usual issue, but in
# neutron's case, we want to import tempest directly for the api tests.
# This wrapper for tox's package installer will use the existing package
# if it exists, else use zuul-cloner if that program exists, else grab it
# from neutron master via a hard-coded URL. That last case should only
# happen with devs running unit tests locally.
ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
tempest_installed=$(python -c "import tempest" 2>/dev/null ; echo $?)
set -e
install_cmd="pip install"
CONSTRAINTS_FILE=$1
shift
if [ "$CONSTRAINTS_FILE" != "unconstrained" ]; then
install_cmd="$install_cmd -c$CONSTRAINTS_FILE"
fi
if [ $tempest_installed -eq 0 ]; then
echo "Tempest already installed; using existing package"
elif [ -x "$ZUUL_CLONER" ]; then
export ZUUL_BRANCH=${ZUUL_BRANCH-$BRANCH}
pushd /tmp
$ZUUL_CLONER --cache-dir \
/opt/git \
git://git.openstack.org \
openstack/tempest
$install_cmd -e openstack/tempest
popd
else
$install_cmd -U -egit+https://git.openstack.org/openstack/tempest#egg=tempest
fi
$install_cmd -U $*

View File

@ -9,7 +9,8 @@ skipsdist = True
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
usedevelop = True
install_command = pip install -U {opts} {packages}
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}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =