@@ -124,25 +124,16 @@ install:
124
124
- |
125
125
# Install dependencies from PyPI.
126
126
python -mpip install --upgrade $PRE -r requirements/testing/travis_all.txt $EXTRAREQS $PINNEDVERS
127
- # GUI toolkits are pip-installable only for some versions of Python so
128
- # don't fail if we can't install them. Make it easier to check whether the
129
- # install was successful by trying to import the toolkit (sometimes, the
127
+ # Check for the successful installation of GUI toolkits (sometimes, the
130
128
# install appears to be successful but shared libraries cannot be loaded at
131
129
# runtime, so an actual import is a better check).
132
- python -mpip install cairocffi pgi &&
133
- python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' &&
134
- echo 'pgi is available' ||
135
- echo 'pgi is not available'
136
- python -mpip install pyqt5 &&
137
- python -c 'import PyQt5.QtCore' &&
138
- echo 'PyQt5 is available' ||
139
- echo 'PyQt5 is not available'
140
- python -mpip install -U \
141
- --no-index -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \
142
- wxPython &&
143
- python -c 'import wx' &&
144
- echo 'wxPython is available' ||
145
- echo 'wxPython is not available'
130
+ if [[ $TRAVIS_OS_NAME = linux ]]; then
131
+ # pgi is only installable on Linux.
132
+ python -mpip install --upgrade $PRE cairocffi pgi
133
+ python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk'
134
+ fi
135
+ python -c 'import PyQt5.QtCore'
136
+ python -c 'import wx'
146
137
147
138
- |
148
139
# Install matplotlib
0 commit comments