Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support for PEP 770 (SBOMs)

Aperta
#763 8 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@fangchenli ci sta già lavorando.

Dal 24/4/2026.

  • #843 di @fangchenli — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
build-system

Direzione di ricerca

Inizia con PEP 770 e la sezione proposta [tool.meson-python.sboms] in pyproject.toml, quindi confrontala con l’approccio install_data esistente di Meson in meson.build. Implementa il caso di base dei file statici in modo che i file SBOM configurati compaiano in .dist-info/sboms/ in ogni wheel; i casi specifici della piattaforma o delle opzioni sono esplicitamente rimandati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
180
Fork
93
Merge medio
18h 33m
PR unite (30g)
19

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mesonbuild/meson-python

Tutte le issue di mesonbuild/meson-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.