Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 311c855

Browse files
authored
Merge pull request #26605 from QuLogic/mac-gtk4
ci: Install GTK4 from brew on macOS
2 parents f9f673f + 8b056ac commit 311c855

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
@@ -144,7 +144,7 @@ jobs:
144144
macOS)
145145
brew install ccache
146146
brew tap homebrew/cask-fonts
147-
brew install font-noto-sans-cjk
147+
brew install font-noto-sans-cjk gobject-introspection gtk4
148148
;;
149149
esac
150150
@@ -219,10 +219,14 @@ jobs:
219219
# libraries cannot be loaded at runtime, so an actual import is a
220220
# better check).
221221
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
222-
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
223-
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
224-
echo 'PyGObject is available' ||
225-
echo 'PyGObject is not available'
222+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
223+
(
224+
python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
225+
echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available'
226+
) && (
227+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
228+
echo 'PyGObject 3 is available' || echo 'PyGObject 3 is not available'
229+
)
226230
227231
# There are no functioning wheels available for OSX 10.12 (as of
228232
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or

0 commit comments

Comments
 (0)