Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Support for PEP 770 (SBOMs)

Offen
#763 8 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@fangchenli arbeitet bereits daran.

Seit 24.4.2026.

  • #843 von @fangchenli — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
build-system

Rechercherichtung

Beginnen Sie mit PEP 770 und dem vorgeschlagenen Abschnitt [tool.meson-python.sboms] in pyproject.toml und vergleichen Sie ihn anschließend mit dem bestehenden Meson-Ansatz install_data in meson.build. Implementieren Sie den grundlegenden Fall statischer Dateien, sodass konfigurierte SBOM-Dateien in jedem Wheel unter .dist-info/sboms/ erscheinen; plattform- oder optionsspezifische Fälle werden ausdrücklich zurückgestellt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

PEP 770 is accepted, and specifies how wheels can start incorporating SBOMs as metadata under .dist-info/sboms/.

PEP 770 does not provide metadata in the [project] table for SBOMs, for reasons discussed in the PEP (static + dynamic metadata is expected to be common). An earlier version did use [project], and https://github.com/pypa/pyproject-metadata/pull/225 prototyped support for that in pyproject-metadata. That part is no longer needed, but support in a build backend will be since .dist-info is generated by a build backend.

Technically it's possible to do something hacky like this today in a meson.build file:

install_data(
    'sboms/an_sbom_filename.spdx.json',
    install_dir: py.get_install_dir() / meson.project_name() + '-' + meson.project_version() + '.dist-info' / 'sboms',
)

But obviously that isn't recommended.

What we need instead is this in pyproject.toml:

# static SBOM files that go into all wheels
[tool.meson-python.sboms]
sbom-files = [
    "sboms/component1.spdx.json",
    "sboms/component2.spdx.json",
]

That's the basic support. There are also cases possible where a vendored component only gets included in wheels for say one platform, or if a particular build option is given. That's a lot harder to deal with, and could be done either in [tool.meson-python] or through some mechanism with data files in meson.build files (e.g., install_data(..., install_tag: 'sbom')` - lots of options and more limited needs, so let's leave that for the future I'd say.

It'd be nice to align this with other backends, so the mechanism looks similar.

Vorherrschende Sprache
Python
Sterne
181
Forks
96
Ø Merge
18 Std. 23 Min.
Gemergte PRs (30 T.)
12

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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus mesonbuild/meson-python

Alle Issues in mesonbuild/meson-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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