From 65d109289874b7c8e9ef2d667a9bf9e46c51fdce Mon Sep 17 00:00:00 2001 From: Kajetan Abt Date: Thu, 6 Aug 2026 22:51:57 +0200 Subject: [PATCH] Fix Linux AppIndicator library path detection on non-multiarch distros (#1131) Co-authored-by: Claude Sonnet 5 --- build.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.spec b/build.spec index 0bf9d07..6432986 100644 --- a/build.spec +++ b/build.spec @@ -71,9 +71,14 @@ hiddenimports: list[str] = [ if sys.platform == "linux": # Needed files for better system tray support on Linux via pystray (AppIndicator backend). arch: str = platform.machine() - libraries_path: Path = Path(f"/usr/lib/{arch}-linux-gnu") - if not libraries_path.exists(): - libraries_path = Path("/usr/lib64") + candidate_library_paths: list[Path] = [ + Path(f"/usr/lib/{arch}-linux-gnu"), # Debian/Ubuntu multiarch + Path("/usr/lib64"), # Fedora/RHEL + Path("/usr/lib"), # Arch and other single-dir distros + ] + for libraries_path in candidate_library_paths: + if (libraries_path / "libayatana-appindicator3.so.1").exists(): + break datas.append( (libraries_path / "girepository-1.0/AyatanaAppIndicator3-0.1.typelib", "gi_typelibs") )