diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 714bac424a..a60a6cc127 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -48,12 +48,13 @@ include = [ module-name = "pyiceberg_core.pyiceberg_core_rust" profile = "release" python-source = "python" -# Optimize for small binary size (https://github.com/apache/iceberg-rust/pull/1841) +# Don't strip: depending on the binary's layout, a stripped macOS .so fails to import +# with "mis-aligned LINKEDIT string pool" (https://github.com/apache/iceberg-rust/issues/3646). config = [ "profile.release.lto=\"thin\"", "profile.release.codegen-units=1", - "profile.release.opt-level=\"z\"", - "profile.release.strip=true", + "profile.release.opt-level=3", + "profile.release.strip=false", ] [tool.ruff.lint]