Remove tox_install.sh

This patch removes a legacy tool for installing tox which started
breaking stable branches based on openstack-requirements. This is a
handcrafted version of the following patch:

  If162dde93423a495064c4ae1a5dad4e7eb8f9577

This wasn't a direct cherry-pick due to the conflicts with refactoring
to use doc/requirements.txt

Change-Id: I8c726cc54aeab8fdad52bdaffa320bad4c5a5a28
(cherry picked from commit dfdd0789a6)
This commit is contained in:
Lance Bragstad 2018-08-31 14:55:54 +00:00
parent 3fb3cfa32f
commit 85da414902
3 changed files with 7 additions and 36 deletions

View File

@ -23,3 +23,6 @@ testrepository>=0.0.18 # Apache-2.0/BSD
testresources>=0.2.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
PyYAML>=3.10.0 # MIT
requests-kerberos>=0.6 # ISC
lxml!=3.7.0,>=2.3 # BSD
oauthlib>=0.6 # BSD

View File

@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Client constraint file contains this client version pin that is in conflict
# with installing the client from source. We should remove the version pin in
# the constraints file before applying it for from-source installation.
CONSTRAINTS_FILE="$1"
shift 1
set -e
# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
# published to logs.openstack.org for easy debugging.
localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
if [[ "$CONSTRAINTS_FILE" != http* ]]; then
CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
fi
# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
pip install -c"$localfile" openstack-requirements
# This is the main purpose of the script: Allow local installation of
# the current repo. It is listed in constraints file and thus any
# install will be constrained and we need to unconstrain it.
edit-constraints "$localfile" -- "$CLIENT_NAME"
pip install -c"$localfile" -U "$@"
exit $?

10
tox.ini
View File

@ -5,16 +5,14 @@ envlist = py35,py27,pep8,releasenotes
[testenv]
usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
BRANCH_NAME=master
CLIENT_NAME=keystoneauth1
OS_STDOUT_NOCAPTURE=False
OS_STDERR_NOCAPTURE=False
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
.[kerberos,saml2,betamax,oauth1]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}
[testenv:pep8]