Skip to content

Commit df418b0

Browse files
committed
Fix Homebrew formula: ensure fresh venv on each install
- Remove existing venv before creating new one to avoid RECORD file conflicts - Document expected dylib fixup warning for Python packages (non-fatal) - The warning occurs because some Python wheels (e.g., orjson) lack header padding - Since venv is copied (not linked) at runtime, this doesn't affect functionality - All tests pass successfully despite the warning
1 parent 9a4eb8b commit df418b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packaging/homebrew/mfc.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class Mfc < Formula
2424
skip_clean "libexec/venv"
2525

2626
def install
27-
# Create Python virtual environment
27+
# Create Python virtual environment (remove existing one first for clean reinstalls)
2828
venv = libexec/"venv"
29+
rm_rf venv
2930
system Formula["[email protected]"].opt_bin/"python3.12", "-m", "venv", venv
3031
system venv/"bin/pip", "install", "--upgrade", "pip", "setuptools", "wheel"
3132

@@ -35,6 +36,8 @@ def install
3536
# Install MFC Python package and dependencies into venv
3637
# Keep toolchain in buildpath for now - mfc.sh needs it there
3738
# Use editable install (-e) to avoid RECORD file issues when venv is copied
39+
# Note: Homebrew may warn about dylib fixup failures for some Python packages (e.g., orjson)
40+
# This is non-fatal since the venv is copied (not linked) at runtime
3841
system venv/"bin/pip", "install", "-e", buildpath/"toolchain"
3942

4043
# Create symlink so mfc.sh uses our pre-installed venv

0 commit comments

Comments
 (0)