mesonbuild / mesonbuild/meson-python
Add a test package and docs for the "C/C++ lib with optional Python bindings" use case
- Dominant language
- Python
- Stars
- 180
- Forks
- 93
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 18
Description
This follows up on the discussion at https://github.com/mesonbuild/meson-python/pull/728#discussion_r2069077299. The use case is multi-language projects, like the Arrow projects, where the root of the repo contains a core C/C++ library and bindings for Python (and perhaps other languages) are present in sub-directories. This is a fairly common layout:
```
meson.build
src/
meson.build
python/
pyproject.toml
meson.build
```
The challenge here is to get the top-level library built and linked against. The idea in the linked discussion is to add:
```
python/
dist_script.py # replaces symlink with a copy for sdist generation
subprojects/
```
We've seen other people struggle with this puzzle when trying to adopt `meson-python`, e.g. in https://github.com/mesonbuild/meson-python/discussions/674. It would be good to have a test package for this project structure, and a bit of documentation to point out how this can be handled.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked pull-request discussion and the project layout described in the issue, then review the existing test packages and documentation for related use cases. Add a test package covering a C/C++ library with Python bindings in a subdirectory, plus guidance for the layout and sdist handling. Done means the package tests build and link the top-level library and the documented workflow is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, python
- Domain
- build-system, documentation, testing
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100