From 2145ded375b0b288ed350bd9fbfe259e59fc8671 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 30 Jan 2016 12:48:09 +0100 Subject: [PATCH] fix pypy on travis --- .travis.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f2b14313..a60a4e695 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,10 +17,7 @@ matrix: - libssl-dev - python: 3.5 script: - - py.test -n 4 -k "not http2" . - - python: pypy3 - script: - - py.test -n 4 -k "not http2" . + - py.test -s --cov netlib -k "not http2" - python: pypy - python: pypy env: OPENSSL=1.0.2 @@ -36,16 +33,36 @@ matrix: # We allow pypy to fail until Travis fixes their infrastructure to a pypy # with a recent enought CFFI library to run cryptography 1.0+. - python: pypy - - python: pypy3 install: + - | + if [[ $TRAVIS_OS_NAME == "osx" ]] + then + brew update || brew update # try again if it fails + brew outdated openssl || brew upgrade openssl + brew install python + fi + - | + if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then + export PYENV_ROOT="$HOME/.pyenv" + if [ -f "$PYENV_ROOT/bin/pyenv" ]; then + pushd "$PYENV_ROOT" && git pull && popd + else + rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT" + fi + export PYPY_VERSION="4.0.1" + "$PYENV_ROOT/bin/pyenv" install --skip-existing "pypy-$PYPY_VERSION" + virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION" + source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate" + fi + - "pip install -U pip setuptools" - "pip install --src . -r requirements.txt" before_script: - "openssl version -a" script: - - "py.test -n 4 --cov netlib" + - "py.test -s --cov netlib" after_success: - coveralls