Improvement: Switch to git tags for version during package build.#142
Open
flamingbear wants to merge 1 commit into
Open
Improvement: Switch to git tags for version during package build.#142flamingbear wants to merge 1 commit into
flamingbear wants to merge 1 commit into
Conversation
flamingbear
commented
Jun 24, 2026
|
|
||
| [build-system] | ||
| requires = ["setuptools"] | ||
| requires = ["setuptools>=64", "setuptools_scm>=8"] |
Member
Author
There was a problem hiding this comment.
dynamic version comes from setuptools_scm now
Rather than bumping the tag in the CI/CD and force pushing back to main. Use setuptools_scm to get the git tag at build time.
ac794a9 to
86812d4
Compare
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.
Jira Issue ID
HARMONY-FIX
Description
Derive the package version from the git tag at build time usind
setuptools_scmso releases no longer require CI to bump and force push to
main.This will allow us to add branch protections to the default branch without
having to add an application to add an exception to the rules. And we can keep
the same basic workflow.
Note:
harmony/__init__.pywill no longer have a literal version string.Local Test Steps
This is a little tough to test, but you can do a few things.
You check out this commit and build the package with
make buildYou will get:
so
+gac794a9bf== built from git commit.Or you can use a pretend version:
and get
you can check the
harmony.__version__still works on either of these by installing the wheel and checking the versionYou can actually fake install any version with the make command:
...Successfully installed harmony-py-3.0.3
The final way you can test how CI/CD will respond is by adding a local tag in the form v.X.Y.Z on the checked out branch with everything clean, then a make build will generate a vX.Y.Z package.
PR Acceptance Checklist
Acceptance criteria metTests added/updated (if needed) and passingDocumentation updated (if needed)