Last active
May 20, 2021 00:43
-
-
Save lephuongbg/b5f7f8d0a1be39ca973fe29ac325380e to your computer and use it in GitHub Desktop.
Pyinstaller hook example to bundle WebKitGTK with a pywebview application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read more about pyinstaller hooks here: | |
# https://pyinstaller.readthedocs.io/en/stable/hooks.html | |
from PyInstaller.utils.hooks import get_gi_typelibs | |
binaries = [] | |
datas = [] | |
hiddenimports = [] | |
_binaries, _datas, _hiddenimports = get_gi_typelibs("WebKit2", "4.0") | |
binaries += _binaries | |
datas += _datas | |
hiddenimports += _hiddenimports | |
_binaries, _datas, _hiddenimports = get_gi_typelibs("Soup", "2.4") | |
binaries += _binaries | |
datas += _datas | |
hiddenimports += _hiddenimports | |
_binaries, _datas, _hiddenimports = get_gi_typelibs("JavaScriptCore", "4.0") | |
binaries += _binaries | |
datas += _datas | |
hiddenimports += _hiddenimports |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment