From: Aric Gardner Date: Fri, 13 Sep 2019 15:31:00 +0000 (-0400) Subject: Pin more-itertools for python2 X-Git-Tag: v0.44.0~12 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=7c7d7c0479ad4c14ff8ad9954f76eff16f527dfa;p=releng%2Fglobal-jjb.git Pin more-itertools for python2 Pin more-itertools for python2 tox-install tox-pyenv requires more-itertools. Force to a compatible version if pip installed via python2 Signed-off-by: Aric Gardner Change-Id: Ia5ade84925cdc6eac2f3407cb732eaf4946769e4 --- diff --git a/releasenotes/notes/tox-install-8864409ad7415d5d.yaml b/releasenotes/notes/tox-install-8864409ad7415d5d.yaml new file mode 100644 index 00000000..97239b54 --- /dev/null +++ b/releasenotes/notes/tox-install-8864409ad7415d5d.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Pip install pyenv from python2 should force more-itertools to 5.0.0 + In a fresh python2.7 venv "pip install pyenv" correctly pulls down + more-itertools [required: Any, installed: 5.0.0] + If for some reason a higher version is already installed this will downgrade + more-itertools to a py2 compatible version diff --git a/shell/tox-install.sh b/shell/tox-install.sh index 25ff3ca5..3734a7f4 100644 --- a/shell/tox-install.sh +++ b/shell/tox-install.sh @@ -15,6 +15,13 @@ echo "---> tox-install.sh" set -eux -o pipefail # Tox version is pulled in through detox to mitigate version conflict -$PYTHON -m pip install --user --quiet --upgrade tox-pyenv + + +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