Skip to content

Commit 3921de6

Browse files
authored
Merge pull request #27000 from meeseeksmachine/auto-backport-of-pr-26605-on-v3.8.x
Backport PR #26605 on branch v3.8.x (ci: Install GTK4 from brew on macOS)
2 parents 2bcad69 + 1b3c2ae commit 3921de6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
macOS)
150150
brew install ccache
151151
brew tap homebrew/cask-fonts
152-
brew install font-noto-sans-cjk
152+
brew install font-noto-sans-cjk gobject-introspection gtk4
153153
;;
154154
esac
155155
@@ -226,10 +226,14 @@ jobs:
226226
# libraries cannot be loaded at runtime, so an actual import is a
227227
# better check).
228228
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
229-
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
230-
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
231-
echo 'PyGObject is available' ||
232-
echo 'PyGObject is not available'
229+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
230+
(
231+
python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
232+
echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available'
233+
) && (
234+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
235+
echo 'PyGObject 3 is available' || echo 'PyGObject 3 is not available'
236+
)
233237
234238
# There are no functioning wheels available for OSX 10.12 (as of
235239
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or

0 commit comments

Comments
 (0)