From e46342eea0c33366bdd66b2b4eeb2554a79b9ede Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 25 Aug 2023 23:46:51 -0400 Subject: [PATCH 1/2] ci: Install GTK4 from brew on macOS We try to install PyGObject everywhere, but this doesn't work because GTK itself is not available from PyPI. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2314f65225a9..a99afd5e3fa8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -144,7 +144,7 @@ jobs: macOS) brew install ccache brew tap homebrew/cask-fonts - brew install font-noto-sans-cjk + brew install font-noto-sans-cjk gobject-introspection gtk4 ;; esac From 8b056ac2b5324604ad1291ecbbc89e0d3280ac94 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 26 Aug 2023 00:46:10 -0400 Subject: [PATCH 2/2] ci: Also check GTK4 when testing PyGObject availability --- .github/workflows/tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a99afd5e3fa8..274b963c0602 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -219,10 +219,14 @@ jobs: # libraries cannot be loaded at runtime, so an actual import is a # better check). # PyGObject, pycairo, and cariocffi do not install on OSX 10.12. - python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject && - python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' && - echo 'PyGObject is available' || - echo 'PyGObject is not available' + python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject && + ( + python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' && + echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available' + ) && ( + python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' && + echo 'PyGObject 3 is available' || echo 'PyGObject 3 is not available' + ) # There are no functioning wheels available for OSX 10.12 (as of # Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or