Skip to content

Commit 3d94e96

Browse files
committed
Add skip_relocation! to Homebrew formula to fix bottle dylib relocation errors
The homebrew-mfc tap CI was failing with 'Failed changing dylib ID' errors when trying to relocate compiled Python C extensions (orjson.so) in the venv. The skip_relocation! directive tells Homebrew to skip dylib relocation during bottling, which is the standard solution for formulas with Python venvs containing compiled extensions with hardcoded paths.
1 parent e21c453 commit 3d94e96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packaging/homebrew/mfc.rb

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

24+
# Skip bottle relocation due to Python venv with compiled extensions (orjson, etc.)
25+
# that have hardcoded paths Homebrew cannot fix during bottling
26+
skip_relocation!
27+
2428
def install
2529
# Create Python virtual environment inside libexec (inside Cellar for proper bottling)
2630
venv = libexec/"venv"

0 commit comments

Comments
 (0)