Skip to content

Migrate from maturin publish to uv build/publish#64

Open
muk2 wants to merge 1 commit intomainfrom
feature/uv-publish-migration
Open

Migrate from maturin publish to uv build/publish#64
muk2 wants to merge 1 commit intomainfrom
feature/uv-publish-migration

Conversation

@muk2
Copy link
Owner

@muk2 muk2 commented Feb 20, 2026

Summary

Replaces all direct maturin CLI usage in CI/CD workflows with uv, aligning with modern Python packaging standards as maturin publish is being deprecated.

  • pypi-release.yml: Replaced PyO3/maturin-action with astral-sh/setup-uv for both building and publishing. Wheels are built with uv build --wheel, sdist with uv build --sdist, and published with uv publish using UV_PUBLISH_TOKEN. Simplified the build matrix from per-Python-version to per-OS (uv handles version targeting).
  • python-wheels.yml: Replaced pip install maturin && maturin build with uv build --wheel. Added explicit Rust toolchain setup. Dropped EOL Python 3.8.
  • release.yml: Fixed --all-features flag in test job that caused PyO3 build failures (same root cause as 🔧 Fix Dependabot PR Backlog & Workflow Label Issues #61). Bumped softprops/action-gh-release from v1 to v2.
  • pyproject.toml: Dropped Python 3.8 support (EOL Dec 2024), minimum is now 3.9.

The maturin build-backend in pyproject.toml is intentionally preserved — uv build delegates to it for compiling the Rust/PyO3 extension into Python-compatible shared libraries.

Build & Publish Flow (before → after)

Step Before After
Build wheels PyO3/maturin-action uv build --wheel
Build sdist maturin sdist uv build --sdist
Publish to PyPI maturin upload uv publish
Auth env var MATURIN_PYPI_TOKEN UV_PUBLISH_TOKEN

Test plan

  • CI passes (check, fmt, clippy, test, build)
  • Workflow YAML validates (no syntax errors)
  • uv build invokes maturin correctly through pyproject.toml build-backend
  • UV_PUBLISH_TOKEN secret needs to be set (same value as PYPI_API_TOKEN)

Closes #62

🤖 Generated with Claude Code

Replace all direct maturin usage in CI workflows with uv, which invokes
maturin through the pyproject.toml build-backend configuration:

- pypi-release.yml: Replace PyO3/maturin-action with astral-sh/setup-uv,
  use `uv build` for wheel/sdist generation and `uv publish` for PyPI
  upload (authenticated via UV_PUBLISH_TOKEN secret)
- python-wheels.yml: Replace `pip install maturin && maturin build` with
  `uv build`, add Rust toolchain setup, drop EOL Python 3.8
- release.yml: Fix --all-features flag causing PyO3 build failures,
  bump softprops/action-gh-release from v1 to v2
- pyproject.toml: Drop Python 3.8 (EOL), set minimum to 3.9

The maturin build-backend in pyproject.toml is preserved since uv
delegates to it for compiling the Rust/PyO3 extension.

Closes #62

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

🚀 Migrate from maturin publish to uv Build & Publish Workflow

1 participant