Add JEDI_TEST_ENVIRONMENT_EXECUTABLE for AppVeyor

This commit is contained in:
micbou
2018-03-24 21:47:32 +01:00
committed by Dave Halter
parent e8b301ebf9
commit bf57fa16fc
6 changed files with 97 additions and 50 deletions

View File

@@ -1,13 +1,30 @@
#! /usr/bin/env bash
set -e
# Check if the desired Python version already exists.
$JEDI_TEST_ENVIRONMENT --version && exit 0 || true
if [[ $JEDI_TEST_ENVIRONMENT == "33" ]]; then
VERSION=3.3
DOWNLOAD=1
fi
if [[ $JEDI_TEST_ENVIRONMENT == "35" ]]; then
VERSION=3.5
DOWNLOAD=1
fi
# Otherwise download and install.
VERSION=`expr "$JEDI_TEST_ENVIRONMENT" : '.*\([0-9]\.[0-9]\)'`
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 /
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
if [[ $DOWNLOAD == 1 ]]; 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
echo "Successfully installed environment."