mesonbuild / meson-python

Meson PEP 517 Python build backend
https://mesonbuild.com/meson-python/
MIT License
118 stars 59 forks source link

`tool.meson-python.limited-api` does not produce ABI3 names #643

Open sdimovv opened 6 days ago

sdimovv commented 6 days ago

meson-python version: 0.16.0

I enabled the limited-api option in my pyproject.toml like so:

[tool.meson-python]
limited-api = true

I am also building my extension modules with limited API enabled:

python.extension_module(
   ...
    limited_api: '3.7',
)

Then, I build with:

python -m build

But the produced wheels do not contain the abi3 in the name. Nor do the .so libs inside.

However, if I instead build like so:

python -m build -C=setup-args="-Dpython.allow_limited_api=true"

Both the wheel and the .so libs inside are named correctly (contain abi3 in the name).

rgommers commented 5 days ago

Are you using Meson >=1.3.0? Older versions don't support the limited API. If so, can you either share your project or a simplified reproducible example?

You can also look at our test package for limited API support and see what is different from yours: https://github.com/mesonbuild/meson-python/tree/main/tests/packages/limited-api