From 4970c7ed780a1ce54d4c3390c10f10d2f621d5d5 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 17 Dec 2015 22:48:21 +0100 Subject: [PATCH] Unfuck pypy builds --- .travis.yml | 10 ++++++++++ scripts/make_travisconf.py | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.travis.yml b/.travis.yml index d706717..3d0a621 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,16 @@ sudo: true language: python install: + - if [ "$TRAVIS_PYTHON_VERSION" == "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; + python --version; + pip --version; + fi - "pip install -U pip" - "pip install wheel" - "make -e install-dev" diff --git a/scripts/make_travisconf.py b/scripts/make_travisconf.py index 03a67e7..8a5d2ed 100644 --- a/scripts/make_travisconf.py +++ b/scripts/make_travisconf.py @@ -24,6 +24,22 @@ p("language: python") p("") with section("install"): + # Travis uses an outdated PyPy, this installs the most recent one. This + # makes the tests run on Travis' legacy infrastructure, but so be it. + # temporary pyenv installation to get pypy-2.6 before container infra + # upgrade + # Taken from werkzeug, which took it from pyca/cryptography + p('- if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then') + p(' git clone https://github.com/yyuu/pyenv.git ~/.pyenv;') + p(' PYENV_ROOT="$HOME/.pyenv";') + p(' PATH="$PYENV_ROOT/bin:$PATH";') + p(' eval "$(pyenv init -)";') + p(' pyenv install pypy-4.0.1;') + p(' pyenv global pypy-4.0.1;') + p(' python --version;') + p(' pip --version;') + p(' fi') + p('- "pip install -U pip"') p('- "pip install wheel"') p('- "make -e install-dev"')