File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ class Mfc < Formula
2121 depends_on "openblas"
22222323
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!
You can’t perform that action at this time.
0 commit comments