Open lpsinger opened 2 months ago
build config settings, as in the kind that are compatible with pip install --config-settings="...."
, take the form:
--config-settings=setup-args="-Dpython.allow_limited_api=true"
as documented by https://mesonbuild.com/Builtin-options.html#module-options
Yes, we should be handling python.allow_limited_api
: https://github.com/mesonbuild/meson-python/blob/6c728bd047372ea9ad7427851d5fc414159bb4a6/mesonpy/__init__.py#L758
And we just added a more descriptive error a few lines below that (not in the 0.16.0 release yet), but only for free-threaded CPython and not PyPy.
Guess we should improve the error message and the docs a bit more.
Yes, this worked, although somehow I found it hard to find this in the documentation.
Great, thanks for confirming. Changed the issue title to reflect that we need to improve the docs here.
The
limited-api
option can only be set through pyproject.toml, not through the build config settings that you can provide on the command line topip
orpython -m build
.Would you please consider supporting
limited-api
as a build config setting? I am using cibuildwheel to build a package that uses the limited API, but my build fails when it tries to install the build package and run my tests under pypy with the following error:I would like to be able to customize the build so that it sets
limited-api
to false for PyPy, but I can't do this becauselimited-api
is not a build config setting. Here's what I would like to do: