summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/tox_install.sh30
-rw-r--r--tox.ini14
2 files changed, 7 insertions, 37 deletions
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index e61b63a..0000000
--- a/tools/tox_install.sh
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/usr/bin/env bash
2
3# Client constraint file contains this client version pin that is in conflict
4# with installing the client from source. We should remove the version pin in
5# the constraints file before applying it for from-source installation.
6
7CONSTRAINTS_FILE="$1"
8shift 1
9
10set -e
11
12# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
13# published to logs.openstack.org for easy debugging.
14localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
15
16if [[ "$CONSTRAINTS_FILE" != http* ]]; then
17 CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
18fi
19# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
20curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
21
22pip install -c"$localfile" openstack-requirements
23
24# This is the main purpose of the script: Allow local installation of
25# the current repo. It is listed in constraints file and thus any
26# install will be constrained and we need to unconstrain it.
27edit-constraints "$localfile" -- "$CLIENT_NAME"
28
29pip install -c"$localfile" -U "$@"
30exit $?
diff --git a/tox.ini b/tox.ini
index 3d3b3a6..59ca260 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,12 +4,11 @@ minversion = 2.0
4skipsdist = True 4skipsdist = True
5 5
6[testenv] 6[testenv]
7setenv = VIRTUAL_ENV={envdir}
8 BRANCH_NAME=master
9 CLIENT_NAME=python-searchlightclient
10usedevelop = True 7usedevelop = True
11install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} 8install_command = pip install {opts} {packages}
12deps = -r{toxinidir}/requirements.txt 9deps =
10 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
11 -r{toxinidir}/requirements.txt
13 -r{toxinidir}/test-requirements.txt 12 -r{toxinidir}/test-requirements.txt
14commands = 13commands =
15 find . -type f -name "*.pyc" -delete 14 find . -type f -name "*.pyc" -delete
@@ -17,7 +16,9 @@ commands =
17whitelist_externals = find 16whitelist_externals = find
18 17
19[testenv:pypy] 18[testenv:pypy]
20deps = setuptools<3.2 19deps =
20 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
21 setuptools<3.2
21 -r{toxinidir}/requirements.txt 22 -r{toxinidir}/requirements.txt
22 -r{toxinidir}/test-requirements.txt 23 -r{toxinidir}/test-requirements.txt
23 24
@@ -30,7 +31,6 @@ commands = {posargs}
30 31
31[testenv:functional] 32[testenv:functional]
32setenv = 33setenv =
33 {[testenv]setenv}
34 OS_TEST_PATH = ./searchlightclient/tests/functional 34 OS_TEST_PATH = ./searchlightclient/tests/functional
35passenv = OS_* 35passenv = OS_*
36 36