summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2017-12-01 14:53:16 +0100
committerAndreas Jaeger <jaegerandi@gmail.com>2017-12-02 17:06:49 +0000
commitc70266da43ad9b5843c377e8e17311f030a31fab (patch)
treec30544cb602d7f1951830056d94a791fe74e542a
parent5e74551f60115684f24c62fc3695dc48d6d7281e (diff)
Avoid tox_install.sh for constraints supportHEADmaster
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: Iff0494f5fc46a57792035aaf44d391cbafa0df87
Notes
Notes (review): Code-Review+2: Sreeram Vancheeswaran <sreeram.vancheeswaran@in.ibm.com> Workflow+1: Sreeram Vancheeswaran <sreeram.vancheeswaran@in.ibm.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 08 Dec 2017 04:47:29 +0000 Reviewed-on: https://review.openstack.org/524608 Project: openstack/os-dpm Branch: refs/heads/master
-rwxr-xr-xtools/tox_install.sh30
-rw-r--r--tox.ini7
2 files changed, 4 insertions, 33 deletions
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index 9e6b126..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
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 $? \ No newline at end of file
diff --git a/tox.ini b/tox.ini
index 4de3559..e8c1166 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,12 +5,13 @@ skipsdist = True
5 5
6[testenv] 6[testenv]
7usedevelop = True 7usedevelop = True
8install_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}
9setenv = 9setenv =
10 VIRTUAL_ENV={envdir} 10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning 11 PYTHONWARNINGS=default::DeprecationWarning
12 CLIENT_NAME=os-dpm 12deps =
13deps = -r{toxinidir}/test-requirements.txt 13 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
14 -r{toxinidir}/test-requirements.txt
14 -r{toxinidir}/requirements.txt 15 -r{toxinidir}/requirements.txt
15whitelist_externals = bash 16whitelist_externals = bash
16commands = bash tools/pretty_tox.sh '{posargs}' 17commands = bash tools/pretty_tox.sh '{posargs}'