Skip to content

Migrate setup.py → pyproject.toml, add setuptools-scm versioning, and PyPI publish workflow - #39

Merged
swainn merged 5 commits into
masterfrom
copilot/migrate-setup-py-to-pyproject-toml
Aug 13, 2026
Merged

Migrate setup.py → pyproject.toml, add setuptools-scm versioning, and PyPI publish workflow#39
swainn merged 5 commits into
masterfrom
copilot/migrate-setup-py-to-pyproject-toml

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Replaces the legacy setup.py (with hardcoded version scraped from README.rst) with a modern pyproject.toml backed by setuptools-scm, and adds a GitHub Actions workflow that auto-publishes to PyPI on version tags.

Changes

  • pyproject.toml — replaces setup.py; build backend is setuptools>=64, version is derived from git tags via setuptools-scm>=8
  • setup.py — removed
  • .github/workflows/publish.yml — triggers on v* tag push; builds sdist + wheel with python -m build, publishes via pypa/gh-action-pypi-publish using OIDC trusted publishing (no stored API token needed)

Release workflow

git tag v1.0.0 && git push origin v1.0.0

One-time PyPI setup

Add a Trusted Publisher on PyPI pointing to this repo, the publish.yml workflow, and the pypi GitHub environment.

…Hub Actions publish workflow

Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Copilot AI changed the title chore: migrate setup.py to pyproject.toml with setuptools-scm and PyPI publish workflow Migrate setup.py → pyproject.toml, add setuptools-scm versioning, and PyPI publish workflow Aug 13, 2026
Copilot AI requested a review from swainn August 13, 2026 19:57
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
@swainn swainn added the ci label Aug 13, 2026
@swainn
swainn marked this pull request as ready for review August 13, 2026 19:59
Copilot AI lite review requested due to automatic review settings August 13, 2026 19:59
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the project’s packaging by migrating from a legacy setup.py (including README-scraped versioning) to a PEP 517/518 + PEP 621 pyproject.toml setup using setuptools-scm for tag-based versions, and adds GitHub Actions workflows to build and publish distributions.

Changes:

  • Replace setup.py with pyproject.toml using setuptools-scm-driven dynamic versioning.
  • Add a tag-triggered GitHub Actions workflow to build and publish to PyPI via OIDC trusted publishing.
  • Add a PR workflow to build sdist/wheel for validation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
setup.py Removes the legacy setuptools entrypoint and README-scraped versioning.
pyproject.toml Adds PEP 621 metadata + setuptools-scm configuration for tag-derived versions.
.github/workflows/publish.yml Introduces tag-based build + OIDC PyPI publish pipeline.
.github/workflows/build.yml Adds PR-time package build workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread .github/workflows/publish.yml
Comment thread .github/workflows/build.yml
swainn and others added 2 commits August 13, 2026 14:39
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
@swainn
swainn merged commit ffa7a04 into master Aug 13, 2026
1 check passed
@swainn
swainn deleted the copilot/migrate-setup-py-to-pyproject-toml branch August 13, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants