From b2b8607bd6adf8b501e34abf179749afb64d2653 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 2 Jan 2018 16:33:05 +0100 Subject: [PATCH] A new version of the travis install script --- travis_install.sh | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/travis_install.sh b/travis_install.sh index c3cd148b..8fce12ce 100755 --- a/travis_install.sh +++ b/travis_install.sh @@ -1,12 +1,34 @@ +#! /usr/bin/env bash set -e -echo "ENV" $JEDI_TEST_ENVIRONMENT -PYTHON=python-3.3 + +if [[ $JEDI_TEST_ENVIRONMENT == "33" ]]; then + VERSION=3.3 + DOWNLOAD=1 +fi +if [[ $JEDI_TEST_ENVIRONMENT == "35" ]]; then + VERSION=3.5 + DOWNLOAD=1 +fi +if [[ $JEDI_TEST_ENVIRONMENT == "36" ]]; then + VERSION=3.6 +fi + +if [[ -z $VERSION ]]; then + echo "Environments should already be installed" + exit 0 +fi + +PYTHON=python-$VERSION # Check if the desired Python version already exists. $PYTHON --version && exit 0 || true -# Otherwise download and install. -wget https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/$PYTHON.tar.bz2 -sudo tar xjf $PYTHON.tar.bz2 --directory / -python3.3 --version -ls /usr/bin +if [[ -z $DOWNLOAD ]]; then + # Otherwise download and install. + DOWNLOAD_NAME=python-$VERSION + wget https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/$DOWNLOAD_NAME.tar.bz2 + sudo tar xjf $DOWNLOAD_NAME.tar.bz2 --directory / +fi + +# Need to add the path in the end. +export PATH=$PATH:/opt/python/$VERSION/bin