diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2019-05-03 14:47:10 -0600 |
---|---|---|
committer | Hervé Beraud <hberaud@redhat.com> | 2019-05-14 18:47:48 +0200 |
commit | 8c5317152b0811ef11d3078b67e30b36c83bb6e8 (patch) | |
tree | f69d00f8fddaaf505b5caad675ae136c633c2e80 | |
parent | 1d4c0f42f941294612b9548058dbe39d21047bba (diff) | |
download | oslo-log-8c5317152b0811ef11d3078b67e30b36c83bb6e8.tar.gz |
Avoid tox_install.sh for constraints support3.44.0
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: I67c50430ced6efcc2f29ec7d8adc871415922d6f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
-rw-r--r-- | doc/requirements.txt | 3 | ||||
-rw-r--r-- | test-requirements.txt | 5 | ||||
-rwxr-xr-x | tools/tox_install.sh | 35 | ||||
-rw-r--r-- | tox.ini | 20 |
4 files changed, 15 insertions, 48 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt index dc949b2..30ef4c8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -6,3 +6,6 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # Apache-2.0 + +# Optional dependencies that are needed to build docs +fixtures>=3.0.0 # Apache-2.0/BSD diff --git a/test-requirements.txt b/test-requirements.txt index e119f19..e17e18a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,10 +9,9 @@ testtools>=2.3.0 # MIT mock>=2.0.0 # BSD oslotest>=3.3.0 # Apache-2.0 -# when we can require tox>= 1.4, this can go into tox.ini: -# [testenv:cover] -# deps = {[testenv]deps} coverage coverage>=4.5.1 # Apache-2.0 # Bandit security code scanner bandit>=1.1.0,<1.6.0 # Apache-2.0 + +fixtures>=3.0.0 # Apache-2.0/BSD diff --git a/tools/tox_install.sh b/tools/tox_install.sh deleted file mode 100755 index 05c58b3..0000000 --- a/tools/tox_install.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# Client constraint file contains this client version pin that is in conflict -# with installing the client from source. We should remove the version pin in -# the constraints file before applying it for from-source installation. - -CONSTRAINTS_FILE="$1" -shift 1 - -set -e - -# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get -# published to logs.openstack.org for easy debugging. -localfile="$VIRTUAL_ENV/log/upper-constraints.txt" - -if [[ "$CONSTRAINTS_FILE" != http* ]]; then - CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE" -fi -# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep -curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile" - -pip install -c"$localfile" openstack-requirements - -# This is the main purpose of the script: Allow local installation of -# the current repo. It is listed in constraints file and thus any -# install will be constrained and we need to unconstrain it. -edit-constraints "$localfile" -- "$CLIENT_NAME" - -if [ -z "$@" ]; then - echo "No packages to be installed." - exit 0 -fi - -pip install -c"$localfile" -U "$@" -exit $? @@ -1,17 +1,13 @@ [tox] minversion = 2.0 -envlist = py36,py27,pep8 +envlist = py27,py36,pep8 [testenv] whitelist_externals = find -setenv = - VIRTUAL_ENV={envdir} - BRANCH_NAME=master - CLIENT_NAME=oslo.log -install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages} -deps = -r{toxinidir}/test-requirements.txt - -e.[fixtures] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} + -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete stestr run {posargs} @@ -30,12 +26,16 @@ commands = {posargs} [testenv:docs] basepython = python3 -deps = -r{toxinidir}/doc/requirements.txt +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -b html doc/source doc/build/html [testenv:releasenotes] basepython = python3 -deps = -r{toxinidir}/doc/requirements.txt +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -b html releasenotes/source releasenotes/build/html [testenv:cover] |