From 4c0802d79667b35dfbdbc248f6ab37892cd7db88 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Mar 2018 17:41:30 +0100 Subject: [PATCH] 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 --- requirements.txt | 10 +++++++ tools/tox_install.sh | 22 -------------- tools/tox_install_project.sh | 58 ------------------------------------ tox.ini | 13 ++++---- 4 files changed, 16 insertions(+), 87 deletions(-) delete mode 100755 tools/tox_install.sh delete mode 100755 tools/tox_install_project.sh diff --git a/requirements.txt b/requirements.txt index 5418ae540e..56e3e81e54 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,4 +27,14 @@ oslo.vmware>=2.17.0 # Apache-2.0 PrettyTable<0.8,>=0.7.1 # BSD tooz>=1.58.0 # Apache-2.0 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 +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 diff --git a/tools/tox_install.sh b/tools/tox_install.sh deleted file mode 100755 index d1bbc5f798..0000000000 --- a/tools/tox_install.sh +++ /dev/null @@ -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 $* diff --git a/tools/tox_install_project.sh b/tools/tox_install_project.sh deleted file mode 100755 index 48a9599794..0000000000 --- a/tools/tox_install_project.sh +++ /dev/null @@ -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 diff --git a/tox.ini b/tox.ini index 14c9e42bee..5c0ca62801 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,8 @@ setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY 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 = -r{toxinidir}/requirements.txt +deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh commands = @@ -49,7 +49,8 @@ commands = sitepackages = True [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 [testenv:py27] @@ -57,8 +58,6 @@ setenv = OS_FAIL_ON_MISSING_DEPS=1 [testenv:pep8] basepython = python2.7 -deps = - {[testenv]deps} commands = # If it is easier to add a check via a shell script, consider adding it in this file sh ./tools/misc-sanity-checks.sh @@ -72,7 +71,6 @@ whitelist_externals = bash [testenv:bandit] -deps = -r{toxinidir}/test-requirements.txt commands = bandit -r vmware_nsx -n 5 -ll [testenv:cover] @@ -85,7 +83,8 @@ commands = commands = {posargs} [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 [flake8]