mesonbuild / mesonbuild/meson-python

Add a test package and docs for the "C/C++ lib with optional Python bindings" use case

Offen
#744 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

documentation tests
Vorherrschende Sprache
Python
Sterne
180
Forks
93
Ø Merge
2 T. 7 Std.
Gemergte PRs (30 T.)
18

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der verlinkten Pull-Request-Diskussion und der im Issue beschriebenen Projektstruktur und prüfe anschließend die vorhandenen Testpakete und die Dokumentation auf verwandte Anwendungsfälle. Füge ein Testpaket hinzu, das eine C/C++-Bibliothek mit Python-Bindings in einem Unterverzeichnis abdeckt, sowie Hinweise zur Struktur und zur Handhabung von sdist. Als erledigt gilt die Aufgabe, wenn die Pakettests die Bibliothek auf oberster Ebene bauen und linken und der dokumentierte Workflow klar ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c, cpp, python
Bereich
build-system, documentation, testing
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.