Codebase list python-procrunner / 22afdf0
Use conda for MacOS travis builds Markus Gerstel 5 years ago
1 changed file(s) with 15 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
1313 - python: pypy
1414 - os: osx
1515 language: generic
16 env: PYTHON=3.7.2 TOXENV=py37
16 env: CONDA=3.7 TOXENV=py37
1717 - os: osx
1818 language: generic
19 env: PYTHON=3.6.8 TOXENV=py36
19 env: CONDA=3.6 TOXENV=py36
2020 - os: osx
2121 language: generic
22 env: PYTHON=3.5.7 TOXENV=py35
22 env: CONDA=3.5 TOXENV=py35
2323 - os: osx
2424 language: generic
25 env: PYTHON=3.4.10 TOXENV=py34
25 env: CONDA=3.4 TOXENV=py34
2626 - os: osx
2727 language: generic
28 env: PYTHON=2.7.16 TOXENV=py27
28 env: CONDA=2.7 TOXENV=py27
2929
3030 allow_failures:
3131 - env: OPTIONAL=1
3333 fast_finish: true
3434
3535 before_install: |
36 if [ "$TRAVIS_OS_NAME" == "osx" ]; then
37 brew update
38 # Per the `pyenv homebrew recommendations <https://github.com/yyuu/pyenv/wiki#suggested-build-environment>`_.
39 brew install openssl readline
40 # See https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages.
41 # I didn't do this above because it works and I'm lazy.
42 brew outdated pyenv || brew upgrade pyenv
43 # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3
44 # doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
45 brew install pyenv-virtualenv
46 pyenv install $PYTHON
47 # I would expect something like ``pyenv init; pyenv local $PYTHON`` or
48 # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to
49 # modify the Bash environment. ??? So, I hand-set the variables instead.
50 export PYENV_VERSION=$PYTHON
51 export PATH="/Users/travis/.pyenv/shims:${PATH}"
52 pyenv-virtualenv venv
53 source venv/bin/activate
36 if [ ! -z "$CONDA" ]; then
37 if [ "$TRAVIS_OS_NAME" == "osx" ]; then
38 curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh --output miniconda.sh
39 fi
40 chmod +x miniconda.sh
41 ./miniconda.sh -b
42 export PATH=$HOME/miniconda3/bin:$PATH
43 conda update --yes conda
44 conda create --yes -n travis python=$CONDA
45 source activate travis
5446 # A manual check that the correct version of Python is running.
5547 python --version
5648 fi