Skip to content
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

Make development auto-generated package versions PEP 440 compliant #85

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

bsweger
Copy link
Collaborator

@bsweger bsweger commented Jan 10, 2025

Out of the box, setuptools_scm generates development package versions in a format that doesn't comply with PEP 440, so the test-pypi publish workflow failed.

That's by design, to prevent dev releases going to PyPI. However, our prod PyPI workflow will trigger only when a tag in the format v[0-9].[0-9].[0-9] is pushed to GitHub, so the liklihood of inadvertently publishing a dev version to PyPI is low.

I also pushed my local v0.2.3 release tag to the repo to make sure setuptools_scm uses that as the baseline when generating new dev tags.

On my local machine, setuptools_scm recognized the tag and versioned subsequent commits as follows:

➜ python -m setuptools_scm
0.2.4.dev1

Out of the box, setuptools_scm generates development
package versions in a format that doesn't comply with
PEP 440, so the test-pypi publish workflow failed.

That's by design, to prevent dev releases going to PyPI.
However, our prod PyPI workflow will trigger only when
a tag in the format v[0-9].[0-9].[0-9] is pushed to
GitHub, so the liklihood of inadvertently publishing
a dev version to PyPI is low.
@bsweger bsweger requested a review from zkamvar January 10, 2025 16:38
Copy link
Member

@zkamvar zkamvar left a comment

Choose a reason for hiding this comment

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

I appreciate you adding context in the commit!

@bsweger bsweger merged commit 26b0eb8 into main Jan 10, 2025
3 checks passed
@bsweger bsweger deleted the bs/fix-setuptools-scm-config/80 branch January 10, 2025 16:50
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.

2 participants