From e432a0f61e6944549e8a7f9d39be4b11fcd226ec Mon Sep 17 00:00:00 2001 From: Martin B Date: Thu, 8 Nov 2018 11:52:28 +0100 Subject: [PATCH] Try fixing linux (by running only for 3.6) and Python (by checking brew package list) --- tools/travis/docker_run.sh | 10 +++++++--- tools/travis/osx_install.sh | 8 +++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/travis/docker_run.sh b/tools/travis/docker_run.sh index 578142a32..7a0f4a301 100755 --- a/tools/travis/docker_run.sh +++ b/tools/travis/docker_run.sh @@ -14,9 +14,13 @@ eval "$(pyenv init -)" pyenv global ${PYVER} pyenv local ${PYVER} -# needed for basemap see https://github.com/matplotlib/basemap/issues/414#issuecomment-436792915 -python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip -python -m pip install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz +if (( PYMAJ == 3 )) && (( PYMIN == 7 )); then + echo "Skipping installing only needed for doctest which are not run on Python 3.7 (see bellow)" +else + # needed for basemap see https://github.com/matplotlib/basemap/issues/414#issuecomment-436792915 + python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip + python -m pip install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz +fi ## disabled for the moment - re-enable later #python -m pip install yapf --upgrade diff --git a/tools/travis/osx_install.sh b/tools/travis/osx_install.sh index f2d0135ef..ab5224093 100755 --- a/tools/travis/osx_install.sh +++ b/tools/travis/osx_install.sh @@ -45,7 +45,13 @@ python -m pip install -r requirements.txt python -m pip install sphinx pillow python -m pip install cpplint [[ "${PYVER}" != "3.7.0" ]] && python -m pip install tensorflow # does not yet exist on python 3.7 -brew install geos + +# Check if not already installed +if brew ls --versions geos > /dev/null; then + echo "geos is already installed" +else + brew install geos +fi # needed for basemap see https://github.com/matplotlib/basemap/issues/414#issuecomment-436792915 python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip python -m pip install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz