Skip to content

Commit

Permalink
ci: install python3.7 using pyenv
Browse files Browse the repository at this point in the history
This is sub-optimal, ideally all python version should be installed
using the same approach.
  • Loading branch information
jcfr committed Mar 5, 2019
1 parent 175271e commit fe428b2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ function install_python_ppa {

function install_python {
local py=$1
apt-get install -y $py $py-dev
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | $py
$py -m pip install --upgrade pip
$py -m pip install --upgrade virtualenv
if [[ "$py" != "python3.7" ]]; then
apt-get install -y $py $py-dev
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | $py
$py -m pip install --upgrade pip
$py -m pip install --upgrade virtualenv
else
# See https://discuss.circleci.com/t/install-python-3-7-in-machine-executor/25883/5
pyenv versions
pyenv global 3.7.1
fi
}

function init_venv {
Expand Down

0 comments on commit fe428b2

Please sign in to comment.