diff options
author | Seth Morton <seth.m.morton@gmail.com> | 2019-02-26 20:48:26 -0800 |
---|---|---|
committer | Seth Morton <seth.m.morton@gmail.com> | 2019-02-26 20:48:26 -0800 |
commit | 5cc89b699e6f18816676009b067a604ea344cd33 (patch) | |
tree | b3248a426e2c56e0e4ebe3146cf496b12f912784 | |
parent | 9852a958cafa489efe30cd19f6a6a3bedb0d3539 (diff) | |
download | natsort-5cc89b699e6f18816676009b067a604ea344cd33.tar.gz |
Attempt to simplify python installation on MacOS
The previous attempt failed because I could not use "pyenv shell". This
new attempt uses a script that was designed to run pyenv in Travis-CI,
so the hope is that this works a bit better. Additionally, this
automatically handles caching of the installed python so subequent jobs
are hopefully more efficient.
-rw-r--r-- | .travis.yml | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml index 3431893..c1c600a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ dist: xenial sudo: false language: python -cache: pip +cache: + - pip + - directories: + - $HOME/.pyenv_cache python: - 2.7 - 3.4 @@ -36,29 +39,29 @@ jobs: - language-pack-en # For MacOS, only run Python 3.7 with and without "icu" - - language: sh + - python: "3.7" + language: sh os: osx env: - WITH_EXTRAS="" - TOXENV=py37 + - PYENV_VERSION="3.7.1" before_install: - - brew update - - brew install pyenv || brew upgrade pyenv - - pyenv install --skip-existing --keep --verbose 3.7.1 - - pyenv shell 3.7.1 - - python --version - - language: sh + - export PYENV_VERSION_STRING="Python ${PYENV_VERSION}" + - wget https://github.com/praekeltfoundation/travis-pyenv/releases/download/0.4.0/setup-pyenv.sh + - source setup-pyenv.sh + - python: "3.7" + language: sh os: osx env: - WITH_EXTRAS="icu" - TOXENV=py37 + - PYENV_VERSION="3.7.1" before_install: - - brew update - brew install icu # need to install icu global package - - brew install pyenv || brew upgrade pyenv - - pyenv install --skip-existing --keep --verbose 3.7.1 - - pyenv shell 3.7.1 - - python --version + - export PYENV_VERSION_STRING="Python ${PYENV_VERSION}" + - wget https://github.com/praekeltfoundation/travis-pyenv/releases/download/0.4.0/setup-pyenv.sh + - source setup-pyenv.sh # This "code-quality" stage does static analysis and formatting checks. # Platform- and Python-version-independent. |