PyPI publication workflow: Generate package SBOM in wheel - #140
Conversation
Add "pitllom" to Hatchling build hook to get SBOM and put it in the wheel. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
|
Python 3.9 is not supported yet. |
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
|
Hatchling's SBOM embedding feature is only from Hatchling 1.29.0, which requires Python >= 3.10. So even Pitloom can generate the SBOM, but Hatchling will not embed the file in the wheel. |
|
Will see if we can inject the SBOM manually. |
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
|
Switch to Pitloom GitHub Action, which works with Python < 3.10. See wheels (*.whl) from these packages for examples of generated SBOM by Pitloom
(SBOM quality are vary by dependencies and types of files in the project. The sentimentdemo is worst, as there are lot of text files without version information.) |
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Better put it only during CI Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
| embed-wheel: "dist/*.whl" | ||
| extras: "content-type" | ||
| content-type: "true" | ||
|
|
There was a problem hiding this comment.
Can we run this during the normal build workflow also so there are no surprises when we publish?
There was a problem hiding this comment.
Yes we can. Will update the test.yml for that. Or maybe a dedicated SBOM generation test workflow.
There was a problem hiding this comment.
.github/workflows/test-sbom.yaml is now added to run for every PR.
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Add Pitloom GitHub Action to generates SBOM and put it in the wheel for publication on PyPI.