diff --git a/nix/build-all.py b/nix/build-all.py index cc86c9bc2d..1b02d89a4e 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -1562,12 +1562,14 @@ if "IfcOpenShell-Python" in targets: if platform.system() != "Darwin": if BUILD_CFG == "Release": - # TODO: This symbol name depends on the Python version? - so = glob.glob(os.path.join(module_dir, "_ifcopenshell_wrapper*.so"))[0] - if "wasm" in flags: - run(["wasm-strip", so, "-k", "dylink.0"]) - else: - run([strip, "-s", "-K", "PyInit__ifcopenshell_wrapper", so], cwd=module_dir) + for so in glob.glob(os.path.join(module_dir, "*.so")): + if "wasm" in flags: + run(["wasm-strip", so, "-k", "dylink.0"]) + elif os.path.basename(so).startswith("_ifcopenshell_wrapper"): + # TODO: This symbol name depends on the Python version? + run([strip, "-s", "-K", "PyInit__ifcopenshell_wrapper", so], cwd=module_dir) + else: + run([strip, "--strip-unneeded", so], cwd=module_dir) return module_dir