.travis/install.sh: shell script to install pyenv (used to install various Pythons); install virtualenv and tox
This commit is contained in:
parent
0dd370760e
commit
c6c1a96136
54
.travis/install.sh
Executable file
54
.travis/install.sh
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [[ "$(uname -s)" == 'Darwin' ]]; then
|
||||||
|
brew update || brew update
|
||||||
|
brew install pyenv
|
||||||
|
brew outdated pyenv || brew upgrade pyenv
|
||||||
|
|
||||||
|
if which -s pyenv; then
|
||||||
|
eval "$(pyenv init -)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${TOXENV}" in
|
||||||
|
py27)
|
||||||
|
curl -O https://bootstrap.pypa.io/get-pip.py
|
||||||
|
python get-pip.py --user
|
||||||
|
;;
|
||||||
|
py33)
|
||||||
|
pyenv install 3.3.6
|
||||||
|
pyenv global 3.3.6
|
||||||
|
;;
|
||||||
|
py34)
|
||||||
|
pyenv install 3.4.3
|
||||||
|
pyenv global 3.4.3
|
||||||
|
;;
|
||||||
|
py35)
|
||||||
|
pyenv install 3.5.0
|
||||||
|
pyenv global 3.5.0
|
||||||
|
;;
|
||||||
|
pypy)
|
||||||
|
pyenv install pypy-4.0.1
|
||||||
|
pyenv global pypy-4.0.1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
pyenv rehash
|
||||||
|
python -m pip install --user virtualenv
|
||||||
|
else
|
||||||
|
# install pyenv to get latest pypy
|
||||||
|
if [[ "${TOXENV}" == "pypy" ]]; then
|
||||||
|
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
|
||||||
|
PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
eval "$(pyenv init -)"
|
||||||
|
pyenv install pypy-4.0.1
|
||||||
|
pyenv global pypy-4.0.1
|
||||||
|
fi
|
||||||
|
pip install virtualenv
|
||||||
|
fi
|
||||||
|
|
||||||
|
python -m virtualenv ~/.venv
|
||||||
|
source ~/.venv/bin/activate
|
||||||
|
pip install tox
|
Loading…
x
Reference in New Issue
Block a user