File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,23 @@ def install
122122 # Copy only pyproject.toml (tiny file, prevents reinstall checks)
123123 cp "#{ prefix } /toolchain/pyproject.toml" build/pyproject.toml
124124
125- # Create a minimal patch file for build.py overrides
125+ # Create a minimal patch file for build.py overrides and path redirection
126126 mkdir -p .mfc_patch
127127 cat > .mfc_patch/build_patch.py << 'PATCH_EOF'
128128 import sys
129+ import os
129130 sys.path.insert(0, "#{ prefix } /toolchain")
131+
132+ # Override MFC_ROOT_DIR to point to our temporary directory
133+ # This ensures lock.yaml and other build artifacts are written to writable temp location
134+ import mfc.common
135+ mfc.common.MFC_ROOT_DIR = os.getcwd()
136+ mfc.common.MFC_BUILD_DIR = os.path.join(mfc.common.MFC_ROOT_DIR, "build")
137+ mfc.common.MFC_LOCK_FILEPATH = os.path.join(mfc.common.MFC_BUILD_DIR, "lock.yaml")
138+ # Keep toolchain and examples pointing to Homebrew installation
139+ mfc.common.MFC_TOOLCHAIN_DIR = "#{ prefix } /toolchain"
140+ mfc.common.MFC_EXAMPLE_DIRPATH = "#{ prefix } /examples"
141+
130142 from mfc.build import MFCTarget
131143
132144 # Override get_install_binpath to use pre-installed binaries
You can’t perform that action at this time.
0 commit comments