Philipp Hörist pushed to branch osx at gajim / gajim


Commits:
4798c365 by Philipp Hörist at 2026-07-30T20:35:31+02:00
Add custom hook

- - - - -


3 changed files:

- mac/gajim.spec
- + mac/hooks/hook-gi.repository.Soup.py
- pyproject.toml


Changes:

=====================================
mac/gajim.spec
=====================================
@@ -16,21 +16,6 @@ info_plist = {
 
 import sys
 import glob
-import platform
-
-hidden_libs = ["libsoup-*.dylib"]
-
-# Get homebrew lib path according to system arch
-if platform.machine() == "x86_64":
-    lib_path = "/usr/local/lib/"
-elif platform.machine() == "arm64":
-    lib_path = "/opt/homebrew/lib/"
-
-# Select the last libs found
-hidden_binaries = []
-for lib_name in hidden_libs:
-    lib_file = glob.glob(lib_path + lib_name)[-1]
-    hidden_binaries.append((lib_file, "."))
 
 sys.path.insert(0, os.path.join(cwd))
 
@@ -72,21 +57,20 @@ gst_include_plugins = [
 a = Analysis(
     ["launch.py"],
     pathex=[cwd],
-    binaries=hidden_binaries,
     datas=[("gajim", "gajim")],
     hiddenimports=hiddenimports,
+    hookspath=[os.path.join(SPECPATH, 'hooks')],
     hooksconfig={
         "gi": {
           "module-versions": {
               "Gtk": "4.0",
-              "GtkSource": "5.0"
+              "GtkSource": "5"
           },
         },
         "gstreamer": {
             "include_plugins": gst_include_plugins,
         },
     },
-    hookspath=[],
     runtime_hooks=[],
     excludes=["PIL._imagingft"],
     win_no_prefer_redirects=False,


=====================================
mac/hooks/hook-gi.repository.Soup.py
=====================================
@@ -0,0 +1,5 @@
+from PyInstaller.utils.hooks.gi import GiModuleInfo
+
+module_info = GiModuleInfo("Soup", "3.0")
+if module_info.available:
+    binaries, datas, hiddenimports = module_info.collect_typelib_data()


=====================================
pyproject.toml
=====================================
@@ -90,7 +90,7 @@ gajim = ["py.typed"]
 version = {attr = "gajim.__version__"}
 
 [tool.codespell]
-skip = 
"*__pycache__*,_build_root,build,debian_build,flatpak_build,dist,test,*.egg-info,.git,*.po,*.po~,*.pot,*.nsi,*.spec,./gajim/common/iana"
+skip = 
"*__pycache__*,_build_root,build,debian_build,flatpak_build,dist,test,*.egg-info,.git,*.po,*.po~,*.pot,*.nsi,*.spec,./gajim/common/iana,hook-*.py"
 ignore-words-list = "claus,pres,ser,trough,THIRDPARTY,addin,selectin,FLE"
 
 [tool.pyright]



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4798c3655d0a8387be79ef27ec53aae9245a0557

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4798c3655d0a8387be79ef27ec53aae9245a0557
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to