gpridge.build_info¶
Build identity: library version, SBOM digest, and dependency versions.
The build inventory is the installed CycloneDX SBOM whose SHA-256 the
library embeds. The native runtime component registry
(gpridge.provenance.component_registry) describes what the running
process loaded; it is reported next to the build inventory, never in place
of it.
read_build_info is the function. The module stays importable as
gpridge.build_info; the package does not rebind that name.
Exceptions¶
An installed SBOM is missing or does not match the library digest. |
Functions¶
|
Places an installed or just-generated SBOM may live. |
|
Version, SBOM digest, the build inventory, and the runtime components. |
Module Contents¶
- exception gpridge.build_info.SbomLookupError¶
Bases:
RuntimeErrorAn installed SBOM is missing or does not match the library digest.
- gpridge.build_info.sbom_directories(module_file: pathlib.Path | None = None) list[pathlib.Path]¶
Places an installed or just-generated SBOM may live.
Search order is
GPRIDGE_SBOM_DIRwhen it is set, thesbomdirectory next to this module, then<prefix>/share/gpridge/sbomfor each ancestor of the module and for the interpreter prefix. A non-Python install keeps the documents under that share directory.
- gpridge.build_info.read_build_info() dict[str, Any]¶
Version, SBOM digest, the build inventory, and the runtime components.
dependenciesare the CycloneDX components keyed by package URL andsourceisbuild-sbom.digest_verifiedis true whengpridge._core.build_infosupplied the digest compiled fromgpr_sbom_digest.hand the installed CycloneDX bytes match it.A library built with
-Dsbom=disabledembeds an empty digest. Thensourceissbom-disabled,dependenciesis empty, and no directory is searched: another installation’s SBOM does not describe this build. Without the extension, the first complete installed SBOM is read unverified; if there is none,SbomLookupErroris raised.runtime_componentsisgpridge.provenance.component_registry()’s component list, or None when the extension is not importable.