From 55459a8c76cca4353c2b1ac9834af6adb208018a Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 23 Nov 2016 17:26:13 -0600 Subject: [PATCH] Install tox in a virtualenv Since TravisCI has an extremely old version of PyPy, we need to use pyenv to install a more recent version. However, pyenv's shims don't persist between the install and script portions of Travis. So we have to use a virtualenv so Travis can find the tox command. --- .travis.yml | 1 + .travis/install.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index f1bd1014..cdb66351 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,4 +25,5 @@ install: - ./.travis/install.sh script: + - source ~/.venv/bin/activate - tox diff --git a/.travis/install.sh b/.travis/install.sh index 270c733a..0ed11410 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -14,4 +14,6 @@ if [[ "${TOXENV}" = pypy* ]]; then fi +python -m virtualenv ~/.venv +source ~/.venv/bin/activate pip install --upgrade tox