Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b0b09b

Browse files
committed
Force Travis CI to install PyPy 5.3.1
1 parent 6142c8e commit 7b0b09b

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.travis.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,22 @@ before_install:
1313
- 'if [[ $GROUP != js* ]]; then COVERAGE=""; fi'
1414
install:
1515
- pip install "setuptools>=18.5"
16-
- if [ $TRAVIS_PYTHON_VERSION == pypy ] ; then pip install https://bitbucket.org/pypy/numpy/get/pypy-4.0.1.zip ; fi
16+
# Installs PyPy (+ its Numpy). Based on @frol comment at:
17+
# https://github.com/travis-ci/travis-ci/issues/5027
18+
- |
19+
if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
20+
export PYENV_ROOT="$HOME/.pyenv"
21+
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
22+
cd "$PYENV_ROOT" && git pull
23+
else
24+
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
25+
fi
26+
export PYPY_VERSION="5.3.1"
27+
"$PYENV_ROOT/bin/pyenv" install "pypy-$PYPY_VERSION"
28+
virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION"
29+
source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate"
30+
pip install https://bitbucket.org/pypy/numpy/get/master.zip
31+
fi
1732
- pip install -f travis-wheels/wheelhouse -e file://$PWD#egg=ipython[test]
1833
- pip install codecov
1934
script:

0 commit comments

Comments
 (0)