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: I48f31084d595c44114391e046e5fe418c1fb787a Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
c862517502
commit
6503e2426e
@ -6,9 +6,6 @@
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
python-memcached>=1.56 # PSF
|
||||
pymongo!=3.1,>=3.0.2 # Apache-2.0
|
||||
etcd3gw>=0.2.0 # Apache-2.0
|
||||
sphinxcontrib-apidoc>=0.2.0 # BSD
|
||||
|
||||
# For autodoc builds
|
||||
|
@ -8,3 +8,6 @@ pifpaf>=0.10.0 # Apache-2.0
|
||||
# Bandit security code scanner
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
python-memcached>=1.56 # PSF
|
||||
pymongo!=3.1,>=3.0.2 # Apache-2.0
|
||||
etcd3gw>=0.2.0 # Apache-2.0
|
||||
|
@ -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 $?
|
50
tox.ini
50
tox.ini
@ -1,30 +1,26 @@
|
||||
[tox]
|
||||
minversion = 2.0
|
||||
envlist = py36,py27,pypy,pep8
|
||||
envlist = py27,py36,pypy,pep8
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
BRANCH_NAME=master
|
||||
CLIENT_NAME=oslo.cache
|
||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
deps = .[dogpile]
|
||||
.[mongo]
|
||||
.[etcd3gw]
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
whitelist_externals =
|
||||
find
|
||||
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 --slowest {posargs}
|
||||
find . -type f -name "*.pyc" -delete
|
||||
stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py27-functional-etcd3gw]
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- stestr run --slowest functional.*
|
||||
find . -type f -name "*.pyc" -delete
|
||||
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- stestr run --slowest functional.*
|
||||
|
||||
[testenv:py35-functional-etcd3gw]
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- stestr run --slowest functional.*
|
||||
find . -type f -name "*.pyc" -delete
|
||||
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- stestr run --slowest functional.*
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
@ -42,20 +38,22 @@ commands = {posargs}
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
whitelist_externals = rm
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
rm -fr doc/build
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
rm -fr doc/build
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
PYTHON=coverage run --source oslo_cache --parallel-mode
|
||||
PYTHON=coverage run --source oslo_cache --parallel-mode
|
||||
commands =
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[flake8]
|
||||
show-source = True
|
||||
@ -69,11 +67,11 @@ import_exceptions =
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
commands =
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
.[dogpile,mongo,etcd3gw]
|
||||
|
Loading…
Reference in New Issue
Block a user