Codebase list python-procrunner / 9530238
try installing Python on OS X Markus Gerstel 6 years ago
1 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4141 - env: MTX=3.8
4242 fast_finish: true
4343
44 before_install: |
45 if [ "$TRAVIS_OS_NAME" == "osx" ]; then
46 brew update
47 # Per the `pyenv homebrew recommendations <https://github.com/yyuu/pyenv/wiki#suggested-build-environment>`_.
48 brew install openssl readline
49 # See https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages.
50 # I didn't do this above because it works and I'm lazy.
51 brew outdated pyenv || brew upgrade pyenv
52 # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3
53 # doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
54 brew install pyenv-virtualenv
55 pyenv install $PYTHON
56 # I would expect something like ``pyenv init; pyenv local $PYTHON`` or
57 # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to
58 # modify the Bash environment. ??? So, I hand-set the variables instead.
59 export PYENV_VERSION=$PYTHON
60 export PATH="/Users/travis/.pyenv/shims:${PATH}"
61 pyenv-virtualenv venv
62 source venv/bin/activate
63 # A manual check that the correct version of Python is running.
64 python --version
65 fi
66
4467 # Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
4568 install: pip install -U tox-travis
4669