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 markdown-script — ADR-012 selected this name; mdscript on PyPI is third-party owned and cannot be shared) 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: v0.4.0 shipped 2026-09-02 with no Python build or publish job in release.yml. This work is now active. PyPI name registration is tracked separately in #292; only a first upload claims the markdown-script name (the pending publisher filed 2026-08-25 reserves nothing and expires unused).

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 markdown-script wheel version equals the
      workspace version (it currently checks crates + npm only; markdown-script 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 markdown-script on a clean machine + provenance
    attestation check.

Notes

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

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions