@@ -22,10 +22,8 @@ class Mfc < Formula
22222323
2424 def install
25- # Create Python virtual environment (remove existing one first for clean reinstalls)
26- venv = var /"mfc/venv"
27- mkdir_p venv . parent
28- rm_r ( venv , force : true )
25+ # Create Python virtual environment inside libexec (inside Cellar for proper bottling)
26+ venv = libexec /"venv"
2927 system Formula [ "[email protected] " ] . opt_bin /
"python3.12" , "-m" , "venv" , venv 3028 system venv /"bin/pip" , "install" , "--upgrade" , "pip" , "setuptools" , "wheel"
3129
@@ -119,7 +117,7 @@ def install
119117 mkdir -p build
120118
121119 # Symlink the persistent venv (no copy)
122- ln -s "#{ var } /mfc /venv" build/venv
120+ ln -s "#{ libexec } /venv" build/venv
123121
124122 # Copy only pyproject.toml (tiny file, prevents reinstall checks)
125123 cp "#{ prefix } /toolchain/pyproject.toml" build/pyproject.toml
@@ -196,8 +194,8 @@ def caveats
196194 assert_path_exists prefix /"toolchain"
197195
198196 # Test that venv exists and has required packages
199- assert_path_exists var / "mfc/ venv"
200- assert_predicate ( var / "mfc/ venv/bin/python") , :executable?
197+ assert_path_exists libexec / " venv"
198+ assert_predicate ( libexec / " venv/bin/python") , :executable?
201199
202200 # Test that examples exist
203201 assert_path_exists prefix /"examples"
0 commit comments