travis: use pyenv to install Jython 2.7.0

This commit is contained in:
Cosimo Lupo 2016-04-13 21:47:32 +01:00
parent c4fe9c7c57
commit f8b309a28d
3 changed files with 13 additions and 5 deletions

View File

@ -6,6 +6,8 @@ matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 2.7
env: TOXENV=jython
- python: 3.3
env: TOXENV=py33
- python: 3.4

View File

@ -36,14 +36,20 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
pyenv rehash
python -m pip install --user --upgrade pip virtualenv
else
# on Linux, we only need pyenv to get the latest pypy
if [[ "${TOXENV}" == "pypy" ]]; then
# on Linux, we only need pyenv to get the latest pypy and jython
if [[ "${TOXENV}" == "pypy" || "${TOXENV}" == "jython" ]]; 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-5.0.0
pyenv global pypy-5.0.0
if [[ "${TOXENV}" == "pypy" ]]; then
pyenv install pypy-5.0.0
pyenv global pypy-5.0.0
else
pyenv install jython-2.7.0
pyenv global jython-2.7.0
fi
pyenv rehash
fi
pip install --upgrade pip virtualenv

View File

@ -3,7 +3,7 @@
set -e
set -x
if [[ "$(uname -s)" == "Darwin" || "${TOXENV}" == "pypy" ]]; then
if [[ "$(uname -s)" == "Darwin" || "${TOXENV}" == "pypy" || "${TOXENV}" == "jython" ]]; then
PYENV_ROOT="$HOME/.pyenv"
PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"