Skip to content

Passing user-specified arguments to python -m build or python -m pip wheel. #1227

Closed
@andyfaff

Description

@andyfaff

Description

I was to build scipy wheels using cibuildwheel. scipy uses mesonpy as a build backend, which then uses meson and ninja. I've got to the stage where I want to cross compile for macosx_arm64. To do so means configuring meson for cross compilation.

I think this can be done via:

# specifies the build directory and configures for cross-compile.
meson setup --cross-file $PROJECT_DIR/tools/wheels/cross_arm64.txt build 
# the builddir option is passed to mesonpy
python -m build -Cbuilddir=build

Specification of the build directory is important because it contains all of the info on the build setup. If builddir is not specified then mesonpy builds in a different directory, all of the specification for cross compilation is lost, and only a native build occurs.

I propose that it should be possible for cibuildwheel to pass options to the front-ends; in this case -Cbuilddir=build to build (or --config-settings builddir=build with pip)?
This has come up a few times in very similar issues, such as #268, #766

Build log

No response

CI config

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions