Skip to content

armgit / SOMA

Public Imported from GitHub
0

Desktop app for designing parametric 3D models in CadQuery together with the coding agent of your choice

python: build_runtime findet ldconfig auch ohne /sbin im PATH

Kai-Jungsthoefel498eb77d92a8
diff --git a/python/scripts/build_runtime.py b/python/scripts/build_runtime.py
index ad7d319..eb13c5a 100644
--- a/python/scripts/build_runtime.py
+++ b/python/scripts/build_runtime.py
@@ -114,7 +114,9 @@ LINUX_BUNDLE = ["libGLU.so.1", "libXft.so.2", "libXinerama.so.1", "libXcursor.so
def bundle_linux_libs(rt):
- cache = subprocess.run(["ldconfig", "-p"], check=True, capture_output=True, text=True).stdout
+ # ldconfig liegt in /sbin bzw. /usr/sbin, das fehlt im PATH normaler Nutzer oft
+ ldconfig = shutil.which("ldconfig") or next((p for p in ("/sbin/ldconfig", "/usr/sbin/ldconfig") if os.path.exists(p)), "ldconfig")
+ cache = subprocess.run([ldconfig, "-p"], check=True, capture_output=True, text=True).stdout
for soname in LINUX_BUNDLE:
m = re.search(rf"^\s*{re.escape(soname)} \(libc6,x86-64[^)]*\) => (\S+)$", cache, re.M)
if not m: