Migrate setup.py → pyproject.toml, add setuptools-scm versioning, and PyPI publish workflow - #39
Merged
Conversation
…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 created this pull request from a session on behalf of
swainn
August 13, 2026 19:57
View session
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
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.pywithpyproject.tomlusingsetuptools-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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the legacy
setup.py(with hardcoded version scraped fromREADME.rst) with a modernpyproject.tomlbacked bysetuptools-scm, and adds a GitHub Actions workflow that auto-publishes to PyPI on version tags.Changes
pyproject.toml— replacessetup.py; build backend issetuptools>=64, version is derived from git tags viasetuptools-scm>=8setup.py— removed.github/workflows/publish.yml— triggers onv*tag push; builds sdist + wheel withpython -m build, publishes viapypa/gh-action-pypi-publishusing OIDC trusted publishing (no stored API token needed)Release workflow
git tag v1.0.0 && git push origin v1.0.0One-time PyPI setup
Add a Trusted Publisher on PyPI pointing to this repo, the
publish.ymlworkflow, and thepypiGitHub environment.