WIP: ENH: implement support for build-details.json (PEP 739) and cross compilation #779
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is very much not ready yet, but I'm opening a WIP PR now to get early feedback, since there's more than one way this can be implemented.
Depends on mesonbuild/meson#14657 (Cc @mgorny)
Closes gh-321
Example of a cross compilation CI job for SciPy, which successfully uses a cross file and a
build-details.json
file to cross compile from x86-64 to aarch64 and then in a second job installs and tests the cross-compiled wheel:The
meson-python
parts of cross compilation that need fixing are:WHEEL
metadata fileThe changes here do both of those things.
A few things I'd like to get input on:
is_cross
andbuild_details
in_WheelBuilder
, for clarity and so that cross compilation without use of abuild-details.json
file can also be supported (parsing the cross file can get the platform right at least, but not the interpreter). We could also decide to not worry about that case and only support supplying both files for a cross build.build-details.json
, for the latter it's shipped as part of CPython.build_details
is hard to type. Usebuild_details: Optional[Dict[str, str | Dict[str, Any]]]
or simplyDict[str, Any]
?