Skip to content

Commit edcfdef

Browse files
committed
fix minor
1 parent 81778cc commit edcfdef

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

packaging/homebrew/mfc.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class Mfc < Formula
2121
depends_on "openblas"
2222
depends_on "[email protected]"
2323

24-
# Skip relocation for Python C extensions in the venv
25-
# The venv is self-contained in libexec and doesn't need Homebrew's relocation
24+
# Skip cleanup for Python venv to preserve C extensions as-is
25+
# Python wheels manage their own RPATHs and don't need Homebrew's relocation
2626
skip_clean "libexec/venv"
2727

2828
def install
@@ -248,6 +248,16 @@ def post_install
248248
(libexec/"mfc").chmod 0755
249249
end
250250

251+
# Override to skip relocation checks for Python C extensions in venv
252+
# Python wheels (especially orjson, cantera) have Mach-O headers without enough
253+
# padding for Homebrew's longer paths. This is safe because:
254+
# 1. The venv is self-contained in libexec and uses relative paths
255+
# 2. Python manages its own RPATH for C extensions
256+
# 3. The venv is never relocated after installation
257+
def skip_relocation?(file, _type)
258+
file.to_s.include?("/libexec/venv/")
259+
end
260+
251261
def caveats
252262
<<~EOS
253263
MFC has been installed successfully!

0 commit comments

Comments
 (0)