From ed648d308dd6175df6589c8a15b3e35889d903ee Mon Sep 17 00:00:00 2001 From: "Bryan W. Weber" Date: Tue, 6 Mar 2018 12:19:22 -0500 Subject: [PATCH] [CI] Fix macOS TravisCI builds Homebrew switched their default Python recipe to Python 3, so install python@2 recipe. Also, directly specify which version of Python should run SCons to prevent picking up the wrong version of Python as the sys.executable. --- .travis.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 836997be6..facb771b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,23 +20,27 @@ addons: - libboost-dev before_script: | echo TRAVIS_OS_NAME: $TRAVIS_OS_NAME - pip2 install --user --install-option="--no-cython-compile" cython - pip2 install --user 3to2 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - brew update - brew install scons + brew update > /dev/null + brew upgrade python # Installs Python 3 + brew install python@2 # Installs Python 2 + brew install scons # Install SCons which *should* use Python 3 + pip3 install numpy cython # Install numpy and Cython for Python 3 + pip2 install numpy 3to2 # Install numpy and 3to2 for Python 2 brew install boost - brew install python3 - pip3 install numpy + else + pip2 install --user --install-option="--no-cython-compile" cython + pip2 install --user 3to2 fi rm -f cantera.conf script: | if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scons build -j2 VERBOSE=y python2_package=full python3_package=full python3_cmd=/usr/bin/python3 blas_lapack_libs=lapack,blas optimize=n coverage=y + scons test else - scons build -j2 VERBOSE=y python2_package=full python3_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y + python3 `which scons` build -j2 VERBOSE=y python2_package=full python3_package=full python2_cmd=/usr/local/opt/python@2/bin/python2 blas_lapack_libs=lapack,blas optimize=n coverage=y + python3 `which scons` test fi - scons test after_success: | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash <(curl -s https://codecov.io/bash)