You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering is there an easy way to propagate settings between the before-build step and the actual build?
To cross-compile Fortran for macos-arm64 we are forced to run a script that downloads the gfortran cross-compiler, e.g.
Only problem is that variables set in the script or even written in the shell config files (.bashrc/.zshrc) are not being picked up by the actual build, where scikit-build runs.
The only working solution that I have found is to explicitly override the environmental variables in the pyproject.toml
# Override the default environment variables with the cross-compiled ones
[tool.cibuildwheel.overrides.environment]
CC = "clang"CXX = "clang++"FC = "/opt/gfortran-darwin-arm64-cross/bin/arm64-apple-darwin20.0.0-gfortran"LDFLAGS = "-L/opt/gfortran-darwin-arm64-cross/lib/gcc/arm64-apple-darwin20.0.0/11.3.0 -Wl,-rpath,/opt/gfortran-darwin-arm64-cross/lib/gcc/arm64-apple-darwin20.0.0/11.3.0"
Other packages like numpy or scipy have opted for native macos-arm64 builds via Cirrus CI ( currently for us a bit of a pain to setup)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was wondering is there an easy way to propagate settings between the
before-build
step and the actual build?To cross-compile Fortran for
macos-arm64
we are forced to run a script that downloads the gfortran cross-compiler, e.g.Only problem is that variables set in the script or even written in the shell config files (.bashrc/.zshrc) are not being picked up by the actual build, where
scikit-build
runs.The only working solution that I have found is to explicitly override the environmental variables in the
pyproject.toml
Other packages like numpy or scipy have opted for native macos-arm64 builds via Cirrus CI ( currently for us a bit of a pain to setup)
Is there a better way of doing this?
Beta Was this translation helpful? Give feedback.
All reactions