aboutsummaryrefslogtreecommitdiff
path: root/.ci/travis-before-install.sh
diff options
context:
space:
mode:
Diffstat (limited to '.ci/travis-before-install.sh')
-rwxr-xr-x.ci/travis-before-install.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/.ci/travis-before-install.sh b/.ci/travis-before-install.sh
new file mode 100755
index 0000000..fdc9202
--- /dev/null
+++ b/.ci/travis-before-install.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e -x
+
+if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
+ git clone --depth 1 https://github.com/yyuu/pyenv.git ~/.pyenv
+ PYENV_ROOT="$HOME/.pyenv"
+ PATH="$PYENV_ROOT/bin:$PATH"
+ eval "$(pyenv init -)"
+
+ if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
+ pyenv install ${PYTHON_VERSION}
+ fi
+ pyenv global ${PYTHON_VERSION}
+ pyenv rehash
+fi