- 
                Notifications
    You must be signed in to change notification settings 
- Fork 80
Description
I'd like for some packages to be able to build them in two ways:
- targeting the version-specific ABI
- targeting a specific version of the stable ABI (for example cp312-abi3) using the limited API
The documentation on what can currently be done with meson-python is here: https://mesonbuild.com/meson-python/reference/pyproject-settings.html#cmdoption-arg-tool.meson-python.limited-api
I see that it is currently quite inconvenient to do that.
One first needs to add
[tool.meson-python]
limited-api = truebut then, to build standard wheels, one needs to use
python -m build -Csetup-args="-Dpython.allow_limited_api=false"And potentially add a project option to specify the limited_api version targeted so that one can run:
python -m build -Csetup-args=-Dlimited-api=3.12"It seems to me that it would be nicer to have a specific meson-python option so that one can just run things like:
# to produce `cp312-abi3` wheels
python -m build -Climited-api=3.12
# to produce standard wheels
python -m buildNote that it seems that the limited API/stable ABI could become more important with 3.15 to build wheels compatible with free-threading and GIL-enabled builds of CPython (see https://peps.python.org/pep-0803/).