Skip to content

Commit 0d36551

Browse files
authored
Merge pull request #99 from redapple/travis-pypy
Travis CI: install pypy with pyenv
2 parents 34435d0 + 0956312 commit 0d36551

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ matrix:
1616
env: TOXENV=py36
1717

1818
install:
19+
- |
20+
if [ "$TOXENV" = "pypy" ]; then
21+
export PYENV_ROOT="$HOME/.pyenv"
22+
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
23+
pushd "$PYENV_ROOT" && git pull && popd
24+
else
25+
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
26+
fi
27+
# get latest portable PyPy from pyenv directly (thanks to natural version sort option -V)
28+
export PYPY_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy2.7-portable-[0-9][\.0-9]*$' |sort -V |tail -1`
29+
"$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY_VERSION"
30+
virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
31+
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
32+
fi
1933
- pip install -U tox twine wheel codecov
2034
script: tox
2135
after_success:

0 commit comments

Comments
 (0)