Skip to content

Commit

Permalink
Hooks: Import correct typelib for GtkosxApplication. (#5475)
Browse files Browse the repository at this point in the history
Updates the hook to import the correct typelib instead of HarfBuzz.
Also puts a guard in place to only use the hook when in macOS to prevent
a traceback caused by an import error in Linux and Windows.
  • Loading branch information
danyeaw committed Jan 27, 2021
1 parent 87c6f02 commit 700c677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PyInstaller/hooks/hook-gi.repository.GtkosxApplication.py
Expand Up @@ -12,7 +12,11 @@
Import hook for PyGObject https://wiki.gnome.org/PyGObject
"""

from PyInstaller.compat import is_darwin
from PyInstaller.utils.hooks import get_gi_typelibs


binaries, datas, hiddenimports = get_gi_typelibs('HarfBuzz', '0.0')
if is_darwin:
binaries, datas, hiddenimports = get_gi_typelibs(
'GtkosxApplication', '1.0'
)
1 change: 1 addition & 0 deletions news/5475.hooks.rst
@@ -0,0 +1 @@
Hooks: Import correct typelib for GtkosxApplication.

0 comments on commit 700c677

Please sign in to comment.