Skip to content

Commit b86725a

Browse files
committed
CI: skip qt, cairo, gobject related installs on OSX on travis
On 2020-09-12 pyqt5 replaced their wheels to have a minimum OSX version of 10.13 which caused us to fallback to trying to build pyqt5 from the tar.gz. This in turn failed (because we do not have any of the qt development libraries installed and even if we did it would take a while). We have always been installing pyside2 from wheels, but an older version (5.13.2) that has a fatal-to-us bug. However the previously published pyqt5 wheels were, despite being labeled as 10.12 actually complied against 10.13 and failed to import. This cause our test suite to decide that we did not have a valid qt binding and skip the qt tests. Now that pyqt5 is (correctly) not installing we are falling back to pyside2 and hitting the bug in pyside2 (it is reported to fixed in the next release 5.14.0 but that only has wheels for 10.13). PyGObject, pycairo, and cariocffi also do not install on OSX 10.12 This skips trying to install pycairo, pygobjoct, pyqt5, and pyside2 on OSX on travis because they all fail to install on OSX 10.12. It will make our CI marginally faster and does not move the status quo of what we were actually testing.
1 parent 3d75230 commit b86725a

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

.travis.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,28 @@ install:
133133
# install was successful by trying to import the toolkit (sometimes, the
134134
# install appears to be successful but shared libraries cannot be loaded at
135135
# runtime, so an actual import is a better check).
136-
python -mpip install --upgrade pycairo cairocffi>=0.8
137-
python -mpip install --upgrade PyGObject &&
138-
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
139-
echo 'PyGObject is available' ||
140-
echo 'PyGObject is not available'
141-
python -mpip install --upgrade pyqt5 &&
142-
python -c 'import PyQt5.QtCore' &&
143-
echo 'PyQt5 is available' ||
144-
echo 'PyQt5 is not available'
145-
python -mpip install --upgrade pyside2 &&
146-
python -c 'import PySide2.QtCore' &&
147-
echo 'PySide2 is available' ||
148-
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
149158
python -mpip install --upgrade \
150159
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
151160
wxPython &&

0 commit comments

Comments
 (0)