UX for constraining build-time and runtime dependencies
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- numpy, python
- Bereich
- build-system
Rechercherichtung
Beginne damit, die vorgeschlagene Konfiguration in pyproject.toml und die im Issue beschriebene mesonpy-Unterstützung zu prüfen. Verfolge, wie sich Build-Zeit-Abhängigkeiten, runtime_pinnings und Abhängigkeitsänderungen im Release-Branch gegenseitig auswirken würden; im Bericht werden keine Quelldateien oder Tests genannt. Als abgeschlossen gilt die Definition und Implementierung des Pinning-Verhaltens für NumPy, nur Bugfix-Versionen und exakte Laufzeitabhängigkeiten einschließlich der Abdeckung von Release-Builds.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
There is a practical UX problem with pyproject.toml that we need to solve. A short description would be:
- Any project that builds against the
numpyC API has to deal with API and ABI compatibility (see the numpy docs on that for details). - as a consequence, the dependency specification for local development is different from the one needed for uploading an sdist to PyPI:
- for local development, you want loose dependencies, e.g.
numpy >= 1.19.5(both a build and runtime dep) - in sdist released to PyPI you want:
oldest-supported-numpy(build dep metapackage, contains==pins per platform) andnumpy>='buildtime_dep,<1.25.0' # should beN+3whereN is current minor version.
- for local development, you want loose dependencies, e.g.
That is obviously a complex set of dependencies to express in pyproject.toml, and we can't have two sets in there at the same time. The solution @FFY00 and I just discussed is:
- On the
mainbranch, use the loose development dependencies (numpy>=1.19.5) - In the CI job(s) that produce artifacts for release to PyPI, ensure that the lowest supported dependencies (which may be platform-dependent) are installed.
- In the release branch, replace the dependencies with the build-time deps needed for uploading to PyPI.
- Have support in
mesonpyfor the various kinds of pinnings people need for releases and API/ABI compatibility.
A rough sketch of how (4) could look:
[build-system]
requires = [
"numpy >= 1.19.5", # replace with (e.g.) `oldest-supported-numpy` in a release branch
]
[tool.mesonpy]
runtime_pinnings = [
# if build version detected is 1.20.3, replace with `>=1.20.3` (while preserving the upper bound,
# so end result would be for example `'>=1.20.3,<1.25.0')
"numpy = 'pin_compatible'",
"pythran = 'bugfix_only'", # if build version detected is 0.10.0, override the build dependency with `'>=0.10.0,<0.11.0'`
"torch = 'exact'", # runtime version must equal build-time version (PyTorch has no ABI stability guarantees)
]
Note that this feature is needed for some other packages than just NumPy too (basically every package offering a C/C++ API has to deal with this), but NumPy alone is important enough - every package containing even a single Cython extension which uses NumPy has to deal with this. However, it's probably still a bit too specific to want native support in pyproject.toml via a standard that all tools must implement. Hence the choice to put this in mesonpy.
- Vorherrschende Sprache
- Python
- Sterne
- 180
- Forks
- 93
- Ø Merge
- 20 Std. 58 Min.
- Gemergte PRs (30 T.)
- 22
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus mesonbuild/meson-python
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
mesonbuild/meson-python#541 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
mesonbuild/meson-python#473 · 6 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation enhancement tests
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 45/100
mesonbuild/meson-python#903 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
mesonbuild/meson-python#871 · 7 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
pip install overrides existing build configurationEvtl. vergeben @Alvaro-Kothe hat das vor 114 Tagen übernommen. Offenquestion
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
mesonbuild/meson-python#851 · 6 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in mesonbuild/meson-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
RedHatQE/mtv-api-tests#721 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
pytest-dev/pluggy#757 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
NousResearch/hermes-agent#134960 ·
Maintainer antworten meist innerhalb von 1 Tag
-
HTML backend: `<br>` leaks the internal sentinel U+E000 into list items, headings and captionsEvtl. vergeben @morten-lagabote hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
docling-project/docling#4671 ·
Maintainer antworten meist innerhalb von 1 Tag