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.
This PR is mainly meant for discussion. These would be the changes required to change to
setuptools_scm
.The advantage of this approach is that you never have to hard-code a version any longer. The version numbers are created when installing it (e.g.,
pip install -e .
or similar) and placed inscooby/version.py
.Example of version numbers:
If scooby is not properly installed, e.g., the folder is copied somewhere without the
.git/
-information, then the version will be unknown plus date:unknown-20220727
.If you don't like this approach we can close this PR again.
Either way, I just found out that this setup does not seem to work with the release-branch setup that was implemented in #90 - because installing it now results in a version number
v0.5.13.dev...
, so it does not recognize the tagReleases/v0.6.0
. This means, if we want to use this we would either have to revert the release branches approach, or adjust my implementation here. As in this approach there are never two commits with identical version numbers, I think we could simply get rid of the release branches again.Edit: To support release branches, we have to add
to the
use_scm_version
-dict insetup.py
. But I guess first we decide if we keep release branches or not.There is one oddity that you might see when looking through the changes:
MANIFEST.in
is normally used to include files.setuptools_scm
reverts that, so everything is included by default, andMANIFEST.in
is used to exclude files.TODO
setuptools_scm
torequirements: host:
.