@@ -87,6 +87,7 @@ matrix:
87
87
env :
88
88
- PRE=--pre
89
89
- os : osx
90
+ osx_image : xcode9
90
91
language : generic # https://github.com/travis-ci/travis-ci/issues/2312
91
92
only : master
92
93
cache :
@@ -101,26 +102,15 @@ matrix:
101
102
allow_failures :
102
103
- python : " nightly"
103
104
104
- before_install : |
105
+ before_install :
106
+ - |
107
+ # Install OS dependencies and set up ccache
105
108
case "$TRAVIS_OS_NAME" in
106
109
linux)
107
110
export PATH=/usr/lib/ccache:$PATH
108
111
;;
109
112
osx)
110
- set -e
111
- ci/silence brew update
112
- brew uninstall numpy gdal postgis
113
- brew unlink python@2
114
- brew install python || brew upgrade python
115
- brew install ffmpeg imagemagick mplayer ccache
116
- hash -r
117
- which python
118
- python --version
119
- set +e
120
- # We could install ghostscript and inkscape here to test svg and pdf
121
- # but this makes the test time really long.
122
- # brew install ghostscript inkscape
123
- export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH
113
+ ci/osx-deps
124
114
;;
125
115
esac
126
116
@@ -143,19 +133,28 @@ install:
143
133
# install was successful by trying to import the toolkit (sometimes, the
144
134
# install appears to be successful but shared libraries cannot be loaded at
145
135
# runtime, so an actual import is a better check).
146
- python -mpip install --upgrade pycairo cairocffi>=0.8
147
- python -mpip install --upgrade PyGObject &&
148
- python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
149
- echo 'PyGObject is available' ||
150
- echo 'PyGObject is not available'
151
- python -mpip install --upgrade pyqt5 &&
152
- python -c 'import PyQt5.QtCore' &&
153
- echo 'PyQt5 is available' ||
154
- echo 'PyQt5 is not available'
155
- python -mpip install --upgrade pyside2 &&
156
- python -c 'import PySide2.QtCore' &&
157
- echo 'PySide2 is available' ||
158
- echo 'PySide2 is not available'
136
+
137
+ # PyGObject, pycairo, and cariocffi do not install on OSX 10.12
138
+
139
+ # There are not functioning wheels available for OSX 10.12 (as of
140
+ # Sept 2020) for either pyqt5 (there are only wheels for 10.13+)
141
+ # or pyside2 (the latest version (5.13.2) with 10.12 wheels has a
142
+ # fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
143
+ if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
144
+ python -mpip install --upgrade pycairo cairocffi>=0.8
145
+ python -mpip install --upgrade PyGObject &&
146
+ python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
147
+ echo 'PyGObject is available' ||
148
+ echo 'PyGObject is not available'
149
+ python -mpip install --upgrade pyqt5 &&
150
+ python -c 'import PyQt5.QtCore' &&
151
+ echo 'PyQt5 is available' ||
152
+ echo 'PyQt5 is not available'
153
+ python -mpip install --upgrade pyside2 &&
154
+ python -c 'import PySide2.QtCore' &&
155
+ echo 'PySide2 is available' ||
156
+ echo 'PySide2 is not available'
157
+ fi
159
158
python -mpip install --upgrade \
160
159
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
161
160
wxPython &&
@@ -169,7 +168,7 @@ install:
169
168
export CPPFLAGS=--coverage
170
169
fi
171
170
- |
172
- python -mpip install -ve . # Install Matplotlib.
171
+ python -mpip install -e . # Install Matplotlib.
173
172
- |
174
173
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
175
174
unset CPPFLAGS
0 commit comments