Make tox runnable in a directory with spaces
I noticed a disturbing lack of quote-wrapping in change I7cb4b44952713752435e1faf0f63bf0d37e7dda6 but as I poked at it, I realized that trouble runs rampant. This seems to clean it all up, though I haven't tested *every* environment we define. Change-Id: I1454eb113e5bd9125d39f2e57e2ed96f6ddc42fc
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# with installing the client from source. We should remove the version pin in
|
# with installing the client from source. We should remove the version pin in
|
||||||
# the constraints file before applying it for from-source installation.
|
# the constraints file before applying it for from-source installation.
|
||||||
|
|
||||||
CONSTRAINTS_FILE=$1
|
CONSTRAINTS_FILE="$1"
|
||||||
shift 1
|
shift 1
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@@ -13,18 +13,18 @@ set -e
|
|||||||
# published to logs.openstack.org for easy debugging.
|
# published to logs.openstack.org for easy debugging.
|
||||||
localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
|
localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
|
||||||
|
|
||||||
if [[ $CONSTRAINTS_FILE != http* ]]; then
|
if [[ "$CONSTRAINTS_FILE" != http* ]]; then
|
||||||
CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
|
CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
|
||||||
fi
|
fi
|
||||||
# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
|
# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
|
||||||
curl $CONSTRAINTS_FILE --insecure --progress-bar --output $localfile
|
curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
|
||||||
|
|
||||||
pip install -c$localfile openstack-requirements
|
python -m pip install -c"$localfile" openstack-requirements
|
||||||
|
|
||||||
# This is the main purpose of the script: Allow local installation of
|
# This is the main purpose of the script: Allow local installation of
|
||||||
# the current repo. It is listed in constraints file and thus any
|
# the current repo. It is listed in constraints file and thus any
|
||||||
# install will be constrained and we need to unconstrain it.
|
# install will be constrained and we need to unconstrain it.
|
||||||
edit-constraints $localfile -- $CLIENT_NAME
|
python "$(which edit-constraints)" "$localfile" -- $CLIENT_NAME
|
||||||
|
|
||||||
pip install -c$localfile -U $*
|
python -m pip install -c"$localfile" -U "$@"
|
||||||
exit $?
|
exit $?
|
||||||
|
5
tox.ini
5
tox.ini
@@ -5,7 +5,8 @@ skipsdist = True
|
|||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = "{toxinidir}/tools/tox_install.sh" "{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}" {opts} {packages}
|
||||||
|
list_dependencies_command = python -m pip freeze
|
||||||
setenv =
|
setenv =
|
||||||
LANG=en_US.utf8
|
LANG=en_US.utf8
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
@@ -24,7 +25,7 @@ passenv = SWIFT_* *_proxy
|
|||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
flake8 swiftclient tests
|
python -m flake8 swiftclient tests
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
Reference in New Issue
Block a user