mesonbuild / mesonbuild/meson-python

Allow the user to specify `limited-api` from the command line

Open
#787 31 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
180
Forks
93
Avg merge
2d 7h
Merged PRs (30d)
18

Description

I think this is a more specific version of https://github.com/mesonbuild/meson-python/issues/639.

Currently, so far as I know, the only way to tell `meson-python` to tag a wheel as ABI compatible is with a [project setting](https://mesonbuild.com/meson-python/reference/pyproject-settings.html#project-settings) via the `pyproject.toml`
```toml
[tool.meson-python]
limited-api = true
```

However, for my project I would like to be able to build abi3 wheels for Python 3.12+, and not for lower versions. So it would be nice to be able to instead specify it via a [build config setting](https://mesonbuild.com/meson-python/reference/config-settings.html). Something like
```bash
python -m build --config-setting=limited-api=true
```

I'd be happy to take a crack at a PR if this seems reasonable?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the meson-python config-settings documentation and the project-settings example in pyproject.toml. Trace how `limited-api` is currently read, then verify that `python -m build --config-setting=limited-api=true` is accepted and produces the requested ABI-compatible wheel behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.