-
Notifications
You must be signed in to change notification settings - Fork 0
Fix PyPI source distribution filename and modernize workflows #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
|
@copilot I'm not sure that you needed to change the name in setup.py. Can you verify? Also, can you update the workflows to match this project? https://github.com/agrc/sweeper |
Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
…ject Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
You're correct - the setup.py name change wasn't necessary. Modern setuptools automatically normalizes project names for PEP 625 compliance. Even with "ugrc-swapper" in setup.py, it generates "ugrc_swapper-1.2.3.tar.gz" filenames. I've reverted the name back to "ugrc-swapper" and updated the workflows to match the sweeper project structure with separate push.yml, pull_request.yml, and release.yml files. Commit: e11ed62 |
|
@copilot What does this line do in pyproject.toml?
Is it necessary? I don't use it in my other projects. |
Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
The When there's no build-backend specified, setuptools defaults to legacy setup.py builds, which still achieve PEP 625 compliance for filename generation. I've removed the build-backend line and updated the setuptools version to match the sweeper project. Commit: 5540639 |
steveoh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I think pypi might need to update its authorized deploy settings to come from the right action name etc. please double check those settings.

This PR fixes the PyPI source distribution filename to comply with PEP 625 requirements and modernizes the GitHub Actions workflows to match the project standards.
Problem
PyPI sent a warning that the uploaded source distribution filename 'ugrc-swapper-1.2.3.tar.gz' was incompatible with PEP 625 because it should use the normalized project name 'ugrc_swapper' (underscores instead of hyphens).
Solution
Updated build system configuration:
[build-system]configuration topyproject.tomlfollowing the sweeper project structurepython -m buildinstead of legacypython setup.py sdist bdist_wheelModernized GitHub Actions workflows:
push.ymlhandles release-please only,pull_request.ymlhandles testing,release.ymlhandles PyPI publishingResult
The source distribution now generates with the correct PEP 625 compliant filename:
ugrc-swapper-1.2.3.tar.gz❌ugrc_swapper-1.2.3.tar.gz✅The package functionality remains unchanged - modern setuptools automatically normalizes the project name for filename generation while preserving the original name "ugrc-swapper" in setup.py for backwards compatibility.
Fixes #33.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.