Browse Source

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: Ie77e688e08aba4df73d127fab024de3879766840
Andreas Jaeger 1 year ago
parent
commit
e1271aaa97
2 changed files with 5 additions and 33 deletions
  1. 0
    30
      tools/tox_install.sh
  2. 5
    3
      tox.ini

+ 0
- 30
tools/tox_install.sh View File

@@ -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
-
7
-CONSTRAINTS_FILE="$1"
8
-shift 1
9
-
10
-set -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.
14
-localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
15
-
16
-if [[ "$CONSTRAINTS_FILE" != http* ]]; then
17
-    CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
18
-fi
19
-# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
20
-curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
21
-
22
-pip 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.
27
-edit-constraints "$localfile" -- "$CLIENT_NAME"
28
-
29
-pip install -c"$localfile" -U "$@"
30
-exit $?

+ 5
- 3
tox.ini View File

@@ -7,8 +7,11 @@ setenv =
7 7
     VIRTUAL_ENV={envdir}
8 8
     BRANCH_NAME=master
9 9
     CLIENT_NAME=debtcollector
10
-install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
11
-deps = -r{toxinidir}/test-requirements.txt
10
+install_command = pip install {opts} {packages}
11
+deps =
12
+ -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
13
+ -r{toxinidir}/test-requirements.txt
14
+ -r{toxinidir}/requirements.txt
12 15
 commands = python setup.py testr --slowest --testr-args='{posargs}'
13 16
 
14 17
 [testenv:debug]
@@ -39,7 +42,6 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
39 42
 commands = python setup.py build_sphinx
40 43
 
41 44
 [testenv:py27]
42
-deps = {[testenv]deps}
43 45
 commands =
44 46
     python setup.py testr --slowest --testr-args='{posargs}'
45 47
     sphinx-build -b doctest doc/source doc/build

Loading…
Cancel
Save