Skip to content

Separate SBOM from dist/ so PyPI publish stops choking on it#149

Merged
timlnx merged 1 commit into
masterfrom
fix-publish-sbom-separation
May 25, 2026
Merged

Separate SBOM from dist/ so PyPI publish stops choking on it#149
timlnx merged 1 commit into
masterfrom
fix-publish-sbom-separation

Conversation

@timlnx
Copy link
Copy Markdown
Owner

@timlnx timlnx commented May 25, 2026

Summary

  • 2.1.0 publish failed (run 26382896561) because dist/bitmath-2.1.0.cdx.json was bundled into the artifact uploaded to PyPI. twine globs every file in packages-dir and rejected the SBOM with InvalidDistribution: Unknown distribution format.
  • The prior comment ("Keep the SBOM out of the PyPI upload") captured the intent; the implementation just never separated the file.
  • Generate the SBOM into sbom/, upload it as its own artifact, download it separately in the publish job, attach it to the GH release from there. dist/ now contains only wheels and sdists.

Test plan

  • Merge to master
  • Tag 2.1.1 (or whatever next version) and create the release
  • Confirm Publish to PyPI workflow goes green and the SBOM lands on the GH release

The 2.1.0 publish run failed because dist/bitmath-2.1.0.cdx.json was
bundled into the dist artifact uploaded to PyPI. twine globs every file
in packages-dir and rejected the SBOM with
"InvalidDistribution: Unknown distribution format". The prior comment
("Keep the SBOM out of the PyPI upload") captured the intent but the
implementation never separated the file.

Generate the SBOM into sbom/, upload it as its own artifact, download
it separately in the publish job, and attach it to the GitHub release
from there. dist/ now contains only wheels and sdists.
@timlnx timlnx merged commit b699ba6 into master May 25, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant