X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Ftox-install.sh;h=3734a7f45c1728a725b3da6abf1026e8716eed90;hb=5f28702c4a74e49627390ffd108c1beea141a27b;hp=9e50ead4021223df8f08421b025f4513960dee9c;hpb=0b1d0ba4945b93dc5d86fffef20f4be44fc5a2f9;p=releng%2Fglobal-jjb.git diff --git a/shell/tox-install.sh b/shell/tox-install.sh index 9e50ead4..3734a7f4 100644 --- a/shell/tox-install.sh +++ b/shell/tox-install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -10,15 +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 -virtualenv --quiet -p "$PYTHON_VERSION" "/tmp/v/tox" -# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091 -source "/tmp/v/tox/bin/activate" -pip install --quiet --upgrade "pip==9.0.3" setuptools -pip install --quiet --upgrade argparse detox "tox<3.0.0" tox-pyenv +# Tox version is pulled in through detox to mitigate version conflict -echo "----> pip freeze" -pip freeze + +if [[ $PYTHON == "python2" ]]; then + $PYTHON -m pip install --user --quiet --upgrade tox-pyenv more-itertools~=5.0.0 +else + $PYTHON -m pip install --user --quiet --upgrade tox-pyenv +fi + + +$PYTHON -m pip freeze