Remove tox_install.sh
As part of removing reliance on the old and deprecated zuul-cloner, we need to shift constraints declaration to the deps line. This means we unfortunately have to duplicate the extras declarations into test-requirements - because otherwise the contraints for keystonemiddleware conflicts with the installation of itself. Change-Id: I8dbb31d1c1fda6df386f456dcf1d8bbed6d168ce
This commit is contained in:
parent
631964c51a
commit
9a6875d479
|
@ -12,11 +12,12 @@ mock>=2.0.0 # BSD
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
requests-mock>=1.2.0 # Apache-2.0
|
requests-mock>=1.2.0 # Apache-2.0
|
||||||
stevedore>=1.20.0 # Apache-2.0
|
stevedore>=1.20.0 # Apache-2.0
|
||||||
stestr # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testresources>=2.0.0 # Apache-2.0/BSD
|
testresources>=2.0.0 # Apache-2.0/BSD
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
python-memcached>=1.56 # PSF
|
python-memcached>=1.56 # PSF
|
||||||
WebTest>=2.0.27 # MIT
|
WebTest>=2.0.27 # MIT
|
||||||
|
oslo.messaging>=5.29.0 # Apache-2.0
|
||||||
|
|
||||||
# Bandit security code scanner
|
# Bandit security code scanner
|
||||||
bandit>=1.1.0 # Apache-2.0
|
bandit>=1.1.0 # Apache-2.0
|
||||||
|
|
|
@ -1,32 +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"
|
|
||||||
|
|
||||||
if [[ -n "$@" ]]; then
|
|
||||||
pip install -c"$localfile" -U "$@"
|
|
||||||
fi
|
|
||||||
exit $?
|
|
11
tox.ini
11
tox.ini
|
@ -5,18 +5,16 @@ envlist = py35,py27,pep8,releasenotes
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
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}
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
BRANCH_NAME=master
|
|
||||||
CLIENT_NAME=keystonemiddleware
|
|
||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
OS_STDERR_CAPTURE=1
|
OS_STDERR_CAPTURE=1
|
||||||
OS_TEST_TIMEOUT=60
|
OS_TEST_TIMEOUT=60
|
||||||
TESTS_DIR=./keystonemiddleware/tests/unit/
|
TESTS_DIR=./keystonemiddleware/tests/unit/
|
||||||
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
.[audit_notifications]
|
-r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = stestr run {posargs}
|
commands = stestr run {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
@ -89,4 +87,3 @@ deps =
|
||||||
-c{toxinidir}/lower-constraints.txt
|
-c{toxinidir}/lower-constraints.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
.[audit_notifications]
|
|
||||||
|
|
Loading…
Reference in New Issue