Remove tox_install.sh
Remove tox_install.sh, we have now all dependencies in global-requirements and don't need this setup anymore. Update tox.ini for this, move constraints into deps for proper working. This enables proper installation of dependencies from git. Depends-On: https://review.openstack.org/552865 Depends-On: https://review.openstack.org/554297 Change-Id: I49d432bdf01221d0244449c4e2be807d0f646afa
This commit is contained in:
parent
5ef3c29977
commit
4c0802d796
@ -27,4 +27,14 @@ oslo.vmware>=2.17.0 # Apache-2.0
|
|||||||
PrettyTable<0.8,>=0.7.1 # BSD
|
PrettyTable<0.8,>=0.7.1 # BSD
|
||||||
tooz>=1.58.0 # Apache-2.0
|
tooz>=1.58.0 # Apache-2.0
|
||||||
decorator>=3.4.0 # BSD
|
decorator>=3.4.0 # BSD
|
||||||
|
|
||||||
|
# These repos are installed from git in OpenStack CI if the job
|
||||||
|
# configures them as required-projects:
|
||||||
neutron>=12.0.0 # Apache-2.0
|
neutron>=12.0.0 # Apache-2.0
|
||||||
|
networking-l2gw>=12.0.0 # Apache-2.0
|
||||||
|
networking-sfc>=6.0.0 # Apache-2.0
|
||||||
|
neutron-lbaas>=12.0.0 # Apache-2.0
|
||||||
|
neutron-fwaas>=12.0.0 # Apache-2.0
|
||||||
|
neutron-vpnaas>=12.0.0 # Apache-2.0
|
||||||
|
neutron-dynamic-routing>=12.0.0 # Apache-2.0
|
||||||
|
vmware-nsxlib>=11.0.0 # Apache-2.0
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DIR=$(dirname $0)
|
|
||||||
${DIR}/tox_install_project.sh networking-l2gw networking_l2gw $*
|
|
||||||
${DIR}/tox_install_project.sh networking-sfc networking_sfc $*
|
|
||||||
${DIR}/tox_install_project.sh neutron-lbaas neutron_lbaas $*
|
|
||||||
${DIR}/tox_install_project.sh vmware-nsxlib vmware_nsxlib $*
|
|
||||||
${DIR}/tox_install_project.sh neutron-fwaas neutron_fwaas $*
|
|
||||||
${DIR}/tox_install_project.sh neutron-dynamic-routing neutron-dynamic-routing $*
|
|
||||||
${DIR}/tox_install_project.sh neutron-vpnaas neutron-vpnaas $*
|
|
||||||
|
|
||||||
CONSTRAINTS_FILE=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
install_cmd="pip install"
|
|
||||||
if [ $CONSTRAINTS_FILE != "unconstrained" ]; then
|
|
||||||
install_cmd="$install_cmd -c$CONSTRAINTS_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$install_cmd -U $*
|
|
@ -1,58 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Many of neutron's repos suffer from the problem of depending on neutron,
|
|
||||||
# but it not existing on pypi.
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# From the tox.ini config page:
|
|
||||||
# install_command=ARGV
|
|
||||||
# default:
|
|
||||||
# pip install {opts} {packages}
|
|
||||||
|
|
||||||
PROJ=$1
|
|
||||||
MOD=$2
|
|
||||||
shift 2
|
|
||||||
|
|
||||||
ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
|
|
||||||
neutron_installed=$(echo "import ${MOD}" | python 2>/dev/null ; echo $?)
|
|
||||||
BRANCH_NAME=master
|
|
||||||
PROJ_DIR=${HOME}/src/git.openstack.org/openstack/${PROJ}
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
CONSTRAINTS_FILE=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
install_cmd="pip install"
|
|
||||||
if [ $CONSTRAINTS_FILE != "unconstrained" ]; then
|
|
||||||
install_cmd="$install_cmd -c$CONSTRAINTS_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$PROJ_DIR" ]; then
|
|
||||||
echo "FOUND code at $PROJ_DIR - using"
|
|
||||||
$install_cmd -U -e ${PROJ_DIR}
|
|
||||||
elif [ $neutron_installed -eq 0 ]; then
|
|
||||||
echo "ALREADY INSTALLED" > /tmp/tox_install-${PROJ}.txt
|
|
||||||
echo "${PROJ} already installed; using existing package"
|
|
||||||
elif [ -x "$ZUUL_CLONER" ]; then
|
|
||||||
echo "${PROJ} not installed; using zuul cloner"
|
|
||||||
echo "ZUUL CLONER" > /tmp/tox_install-${PROJ}.txt
|
|
||||||
cwd=$(/bin/pwd)
|
|
||||||
cd /tmp
|
|
||||||
$ZUUL_CLONER --cache-dir \
|
|
||||||
/opt/git \
|
|
||||||
--branch ${BRANCH_NAME} \
|
|
||||||
git://git.openstack.org \
|
|
||||||
openstack/${PROJ}
|
|
||||||
cd openstack/${PROJ}
|
|
||||||
$install_cmd -e .
|
|
||||||
cd "$cwd"
|
|
||||||
else
|
|
||||||
echo "${PROJ} not installed; using egg"
|
|
||||||
echo "PIP HARDCODE" > /tmp/tox_install-${PROJ}.txt
|
|
||||||
$install_cmd -U -egit+https://git.openstack.org/openstack/${PROJ}@${BRANCH_NAME}#egg=${PROJ}
|
|
||||||
fi
|
|
13
tox.ini
13
tox.ini
@ -8,8 +8,8 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
PYTHONWARNINGS=default::DeprecationWarning
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
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 = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
commands =
|
commands =
|
||||||
@ -49,7 +49,8 @@ commands =
|
|||||||
sitepackages = True
|
sitepackages = True
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
|
-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:py27]
|
[testenv:py27]
|
||||||
@ -57,8 +58,6 @@ setenv = OS_FAIL_ON_MISSING_DEPS=1
|
|||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
deps =
|
|
||||||
{[testenv]deps}
|
|
||||||
commands =
|
commands =
|
||||||
# If it is easier to add a check via a shell script, consider adding it in this file
|
# If it is easier to add a check via a shell script, consider adding it in this file
|
||||||
sh ./tools/misc-sanity-checks.sh
|
sh ./tools/misc-sanity-checks.sh
|
||||||
@ -72,7 +71,6 @@ whitelist_externals =
|
|||||||
bash
|
bash
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
|
||||||
commands = bandit -r vmware_nsx -n 5 -ll
|
commands = bandit -r vmware_nsx -n 5 -ll
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
@ -85,7 +83,8 @@ commands =
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -b html doc/source doc/build/html
|
commands = sphinx-build -b html doc/source doc/build/html
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
Loading…
Reference in New Issue
Block a user