summaryrefslogtreecommitdiffstats
path: root/.travis/install.sh
blob: 8605c57f84843951ed7088cfb5d3f82ad76d1825 (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
#!/bin/bash

set -ex

if [[ "$(uname -s)" == 'Darwin' ]]; then
    sw_vers

    git clone --depth 1 https://github.com/pyenv/pyenv ~/.pyenv
    export PYENV_ROOT="$HOME/.pyenv"
    export PATH="$PYENV_ROOT/bin:$PATH"
    eval "$(pyenv init -)"

    case "${TOXENV}" in
        py36)
            pyenv install 3.6.1
            pyenv global 3.6.1
            ;;
    esac
    pyenv rehash
fi

pip install virtualenv
python -m virtualenv ~/.venv
source ~/.venv/bin/activate
pip install tox