Skip to content

Commit ac746fd

Browse files
committed
Move GUI toolkits to requirement files too for CI.
Also make it a failure to fail to install the GUI toolkits for testing, to avoid missing new failures there.
1 parent 3a5d8c2 commit ac746fd

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

.travis.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,16 @@ install:
124124
- |
125125
# Install dependencies from PyPI.
126126
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
130128
# install appears to be successful but shared libraries cannot be loaded at
131129
# 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'
146137
147138
- |
148139
# Install matplotlib

requirements/testing/travis_all.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
# pip requirements for all the travis builds
22

3+
--find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04
4+
35
codecov
46
coverage
5-
cycler
6-
numpy
77
pillow
88
pyparsing
9+
10+
# GUI toolkits
11+
12+
# pgi is only installable on Linux
13+
pyqt5
14+
# wxpython 4.0.2 is broken on OSX, see https://groups.google.com/forum/#!topic/wxpython-dev/lNvdniiXhdY
15+
wxpython!=4.0.2
16+
917
# pytest-timeout master depends on pytest>=3.6. Testing with pytest 3.4 is
1018
# still supported; this is tested by the first travis python 3.5 build
19+
1120
pytest>=3.6
1221
pytest-cov
1322
pytest-faulthandler

0 commit comments

Comments
 (0)