Skip to content

Automate the package build/distribution check across PyPI repos #568

Description

@farhan

Summary

Packaging correctness of the wheel and sdist is verified via agentic prompting per PR today. We should turn it into one reusable, automated check adopted across all PyPI-publishing repos.

The packaging check on DoneXBlock#388 is a real run of it — it caught the test package shipped into the wheel, NOTICE dropped, and the sdist bloated with coverage artifacts.

Proposed work

Build a reusable check (e.g. a shared GitHub Actions workflow) that builds the wheel + sdist and asserts:

  • Test packages and .pyc files are not shipped into the wheel.
  • Required files are present — sources, static assets, LICENSE, NOTICE, METADATA/PKG-INFO.
  • The sdist is pruned — no htmlcov/, coverage.xml, or .coverage.
  • No content regressions versus the base branch in the wheel or sdist.

Acceptance criteria

  • Reusable packaging check created.
  • Adopted across the PyPI-publishing repos.

Implementation approach

Reusable GitHub Actions workflow (recommended) — a workflow_call workflow in a central repo composing check-manifest, check-wheel-contents, and twine check, plus a step asserting LICENSE/NOTICE.
Repos adopt it with a small caller job, so central fixes propagate everywhere without per-repo changes.

Shared tox target / test module — the same checks packaged as a tiny installable each repo runs in its own test suite.
Gives local control, but every update needs a PR per repo, so it is weaker for org-wide rollout.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions