X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Ftox-install.sh;h=f8472cc9287ad5b5f8d3c922dc4802569ba7c74a;hb=e1a8dc64cfe10360ebdcadd28806adf800760ce7;hp=4708e88c374f33053fa4cf609fde848e04f87d39;hpb=573fe2c6a78b283ec118c988454595ccf187e850;p=releng%2Fglobal-jjb.git diff --git a/shell/tox-install.sh b/shell/tox-install.sh index 4708e88c..f8472cc9 100644 --- a/shell/tox-install.sh +++ b/shell/tox-install.sh @@ -10,12 +10,18 @@ ############################################################################## echo "---> tox-install.sh" -# Ensure we fail the job if any steps fail. -# DO NOT set -u as virtualenv's activate script has unbound variables -set -e -o pipefail +# Ensure we fail the job if any steps fail or variables are missing. +# Use -x to show value of $PYTHON in output +set -eux -o pipefail # Tox version is pulled in through detox to mitigate version conflict -python -m pip install --user --quiet --upgrade tox-pyenv -echo "----> pip freeze" -pip freeze + +if [[ $PYTHON == "python2" ]]; then + $PYTHON -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv more-itertools~=5.0.0 +else + $PYTHON -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv +fi + + +$PYTHON -m pip freeze