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 <agardner@linuxfoundation.org>
Change-Id: Ia5ade84925cdc6eac2f3407cb732eaf4946769e4
--- /dev/null
+---
+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
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