summaryrefslogtreecommitdiff
path: root/.travis/install.sh
blob: 26e31e9ad404f55123b67bd8870ca573233185de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

set -e
set -x

if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
    if [ ! -e "$HOME/.pyenv-simplejson/.git" ]; then
      if [ -e "$HOME/.pyenv-simplejson" ]; then
        rm -rf ~/.pyenv-simplejson
      fi
      git clone https://github.com/pyenv/pyenv.git ~/.pyenv-simplejson
    else
      (cd ~/.pyenv-simplejson; git pull)
    fi
    PYENV_ROOT="$HOME/.pyenv-simplejson"
    PATH="$PYENV_ROOT/bin:$PATH"
    hash -r
    eval "$(pyenv init -)"
    hash -r
    pyenv install --list
    pyenv install -s $PYENV_VERSION
    pip install wheel
fi

if [[ $BUILD_WHEEL == 'true' ]]; then
    pip install wheel cibuildwheel==1.5.2
fi