WIP: ENH: implement support for build-details.json (PEP 739) and cross compilation#779
WIP: ENH: implement support for build-details.json (PEP 739) and cross compilation#779rgommers wants to merge 1 commit intomesonbuild:mainfrom
Conversation
|
I haven't read PEP 739 recently, but I was under the impression that PEP 739 will also be used for building native wheels, not only for cross compilation, or in other words that given a Python interpreter it should be possible to load a |
|
Good point. Yes, there isn't any reason that So for now in this PR we can distinguish three cases, with the user passing:
I focused on (3) first and have a TODO in here already to add (1); I should add (2) as well. |
|
Note that mesonbuild/meson#14657 have been merged and is available since version 1.10.0 |
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.jsonfile to cross compile from x86-64 to aarch64 and then in a second job installs and tests the cross-compiled wheel:The
meson-pythonparts of cross compilation that need fixing are:WHEELmetadata fileThe changes here do both of those things.
A few things I'd like to get input on:
is_crossandbuild_detailsin_WheelBuilder, for clarity and so that cross compilation without use of abuild-details.jsonfile 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_detailsis hard to type. Usebuild_details: Optional[Dict[str, str | Dict[str, Any]]]or simplyDict[str, Any]?