summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2017-12-02 07:11:16 +0100
committerAndreas Jaeger <jaegerandi@gmail.com>2017-12-02 17:03:27 +0000
commit7cd8d5a663965960db6d78df274afa96cdcb9e79 (patch)
treee3c89a1382114e05ec88cbe537fa5e588a9e154d
parenta8e643ed7944700aa78ace7d0b47beeaeae11a9a (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: I42b7dcd3e9e41688ac3bd8b9c9fb9b39f90c3e9a
Notes
Notes (review): Code-Review+2: Graham Hayes <gr@ham.ie> Workflow+1: Graham Hayes <gr@ham.ie> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 09 Dec 2017 00:07:49 +0000 Reviewed-on: https://review.openstack.org/524788 Project: openstack/designate-tempest-plugin Branch: refs/heads/master
-rwxr-xr-xtools/tox_install.sh30
-rw-r--r--tox.ini8
2 files changed, 4 insertions, 34 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 196d873..3163c7d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,13 +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}
9deps = -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
10 -r{toxinidir}/test-requirements.txt 12 -r{toxinidir}/test-requirements.txt
11setenv = 13setenv =
12 VIRTUAL_ENV={envdir} 14 VIRTUAL_ENV={envdir}
13 BRANCH_NAME=master
14 CLIENT_NAME=designate-tempest-plugin
15 PYTHONDONTWRITEBYTECODE=1 15 PYTHONDONTWRITEBYTECODE=1
16whitelist_externals = sh 16whitelist_externals = sh
17 find 17 find