summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2017-12-02 09:38:54 +0100
committerAndreas Jaeger <jaegerandi@gmail.com>2017-12-02 16:58:32 +0000
commit959204ce38e53a3ca1071858be14a8f4a5270f00 (patch)
tree21ff8e6d7f2f66fe34acde268103d8f534cb6590
parentad69829716609fc725f003b1bd3e48c17c498c70 (diff)
Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself and install the project correctly. Thus update tox.ini and remove the now obsolete tools/tox_install.sh file. This follows https://review.openstack.org/#/c/508061 to remove tools/tox_install.sh. Change-Id: Iffcd4035b0d0a7765db9c6dfba1c9dff68076082
Notes
Notes (review): Code-Review+2: Steve McLellan <steven.j.mclellan@gmail.com> Workflow+1: Steve McLellan <steven.j.mclellan@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 04 Dec 2017 17:52:24 +0000 Reviewed-on: https://review.openstack.org/524842 Project: openstack/python-searchlightclient Branch: refs/heads/master
-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