@@ -31,17 +31,26 @@ def install
3131 # Cantera has CMake compatibility issues when building from source with newer CMake versions
3232 system venv /"bin/pip" , "install" , "cantera==3.1.0"
3333
34- # Set LDFLAGS to ensure Python C extensions (like orjson) are compiled with enough
34+ # Set LDFLAGS to ensure Python C extensions are compiled with enough
3535 # header padding for Homebrew's bottle relocation process
3636 # This fixes "Failed changing dylib ID" errors during bottling
3737 ENV . append "LDFLAGS" , "-Wl,-headerpad_max_install_names"
38+ ENV . append "CFLAGS" , "-Wl,-headerpad_max_install_names"
39+ ENV . append "CXXFLAGS" , "-Wl,-headerpad_max_install_names"
3840
3941 # Install MFC Python package and dependencies into venv
4042 # Use editable install (-e) to avoid RECORD file issues when venv is symlinked at runtime
41- # Most dependencies use pre-built wheels; only packages with C extensions will be compiled
43+ # Most dependencies use pre-built wheels initially
4244 # Keep toolchain in buildpath for now - mfc.sh needs it there
4345 system venv /"bin/pip" , "install" , "-e" , buildpath /"toolchain"
4446
47+ # Force-reinstall packages with C extensions from source with proper LDFLAGS
48+ # This ensures they have correct header padding for bottle relocation
49+ # orjson is a transitive dependency that comes from pre-built wheels without proper padding
50+ # --no-deps prevents reinstalling dependencies, only the target package
51+ system venv /"bin/pip" , "install" , "--no-binary" , ":all:" , "--force-reinstall" ,
52+ "--no-deps" , "orjson"
53+
4554 # Create symlink so mfc.sh uses our pre-installed venv
4655 mkdir_p "build"
4756 ln_sf venv , "build/venv"
0 commit comments