Skip to content

Python bindings: cross-platform wheel matrix + PyPI publishing (+ cp314t) #132

Description

@dean0x

Follow-up to #59 / #131. The native Python bindings (crates/mds-python, to be published as mdscript) landed in #131 as a dev/test-only crate — the extension builds and the pytest suite runs in CI, but no wheels are published. This issue tracks turning that into a real PyPI distribution as part of the single coordinated release.

Note: PyPI name registration is tracked separately in #292 (pre-tag prerequisite). That step should happen before the v0.4.0 tag; the work below is deferred to a post-v0.4.0 follow-up.

Scope

  • Cross-platform wheel matrix. Build cp311-abi3 wheels for the release
    target platforms (mirror the napi 7-target set where a Python ABI exists):
    manylinux/musllinux x86_64 + aarch64, macOS x86_64 + arm64, Windows x86_64.
    Use maturin build --release (via maturin-action or the pinned maturin) with an
    sdist.
  • PyPI publishing via OIDC trusted publisher for release.yml (preferred; no
    long-lived token), mirroring the npm provenance setup. Publish wheels + sdist.
  • Wire into the coordinated release. Extend:
    • release.yml — a build-python matrix + publish-python job, gated on the
      version check, ordered with the crates.io/npm publishes.
    • scripts/verify-versions.mjs — assert the mdscript wheel version equals the
      workspace version (it currently checks crates + npm only; mdscript gets its
      version from the Cargo workspace via maturin dynamic, so this is an added
      assertion, not a new source of truth).
    • scripts/bump-version.mjs — no manifest edit needed (version is dynamic), but
      confirm the CHANGELOG/coordination covers the Python package.
  • cp314t free-threaded wheels. The extension is already free-threading ready
    (frozen result classes, #[pymodule(gil_used = false)], GIL released per compile);
    the cp314t ABI is a separate build. Add it once the toolchain/runner support is
    stable and soaked.
  • Post-publish smoke: pip install mdscript on a clean machine + provenance
    attestation check.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions