--- /dev/null
+---
+fixes:
+ - |
+ Workarounds for aging python 3.5 on Ubuntu 16.04 builders
+ Ubuntu 16.04 calls a python2 version of tox we must upgrade
+ it even if we are testing with python3
+ ubuntu 16.04 runs python 3.5 we must pin the zipp package
+ more pins will be needed as packages drop support for python 3.5
+ ideally projects will move away from this distro.
yq
EOF
+ #Python 3.5 in Ubuntu 16.04 workaround
+ if [[ -f /etc/lsb-release ]]; then
+ # shellcheck disable=SC1091
+ source /etc/lsb-release
+ if [[ $DISTRIB_RELEASE == "16.04" ]]; then
+ echo "WARNING: Python projects should move to Ubuntu 18.04 to continue receiving support"
+ echo "zipp==1.1.0" >> "$requirements_file"
+ fi
+ fi
# Use `python -m pip` to upgrade to the latest pip into user site-packages
python3 -m pip install --user --quiet --upgrade pip
python3 -m pip install --user --quiet --no-warn-script-location --upgrade setuptools
# 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 3.5 and python2 tox in Ubuntu 16.04 workaround
+done="False"
+if [[ -f /etc/lsb-release ]]; then
+ # shellcheck disable=SC1091
+ source /etc/lsb-release
+ if [[ $DISTRIB_RELEASE == "16.04" ]]; then
+ echo "WARNING: Python projects should move to Ubuntu 18.04 to continue receiving support"
+ python2 -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv more-itertools~=5.0.0
+ python3 -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv zipp==1.1.0
+ done="True"
+ fi
+fi
-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
+if [[ $done != "True" ]]; then
+ 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
fi
# installs are silent, show version details in log