@@ -78,6 +78,38 @@ stages:
78
78
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt
79
79
displayName: 'Install dependencies with pip'
80
80
81
+ -bash :|
82
+ if [[ "$PYTHON_VERSION" != 'Pre' ]]; then
83
+ # GUI toolkits are pip-installable only for some versions of Python
84
+ # so don't fail if we can't install them. Make it easier to check
85
+ # whether the install was successful by trying to import the
86
+ # toolkit (sometimes, the install appears to be successful but
87
+ # shared libraries cannot be loaded at runtime, so an actual import
88
+ # is a better check).
89
+ python -m pip install --upgrade pycairo cairocffi>=0.8
90
+ python -m pip install --upgrade 'PyGObject${{ matrix.pygobject-ver }}' &&
91
+ (
92
+ python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
93
+ echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available'
94
+ ) && (
95
+ python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
96
+ echo 'PyGObject 3 is available' || echo 'PyGObject 3 is not available'
97
+ )
98
+ python -m pip install --upgrade pyqt5 &&
99
+ python -c 'import PyQt5.QtCore' &&
100
+ echo 'PyQt5 is available' ||
101
+ echo 'PyQt5 is not available'
102
+ python -m pip install --upgrade pyside2 &&
103
+ python -c 'import PySide2.QtCore' &&
104
+ echo 'PySide2 is available' ||
105
+ echo 'PySide2 is not available'
106
+ python -m pip install --upgrade --only-binary :all: wxPython &&
107
+ python -c 'import wx' &&
108
+ echo 'wxPython is available' ||
109
+ echo 'wxPython is not available'
110
+ fi
111
+ displayName: 'Install GUI dependencies with pip'
112
+
81
113
-bash :|
82
114
CONFIG='--config-settings=setup-args=--vsenv'
83
115
CONFIG="$CONFIG --config-settings=setup-args=-Dcpp_link_args=-PROFILE"