2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> tox-install.sh"
13 # Ensure we fail the job if any steps fail or variables are missing.
14 # Use -x to show value of $PYTHON in output
17 #Python 3.5 and python2 tox in Ubuntu 16.04 workaround
19 if [[ -f /etc/lsb-release ]]; then
20 # shellcheck disable=SC1091
21 source /etc/lsb-release
22 if [[ $DISTRIB_RELEASE == "16.04" ]]; then
23 echo "WARNING: Python projects should move to Ubuntu 18.04 to continue receiving support"
24 python2 -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv more-itertools~=5.0.0
25 python3 -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv zipp==1.1.0
30 if [[ $done != "True" ]]; then
31 python -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv zipp more-itertools~=5.0.0
32 python3 -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv
35 # installs are silent, show version details in log
37 $PYTHON -m pip --version