Versioneer keeps returning 0+untagged
See original GitHub issueJust installed a fresh copy of non-vendored versioneer 0.24 in my git repo.
The python3 setup.py version
gives:
running version
keywords are unexpanded, not using
got version from VCS {'version': '0+untagged.36.gef18964', 'full-revisionid': 'ef1896454cff6769d92420c72737065076fc71a0', 'dirty': False, 'error': None, 'date': '2022-08-31T18:59:48+0200'}
Version: 0+untagged.36.gef18964
full-revisionid: ef1896454cff6769d92420c72737065076fc71a0
dirty: False
date: 2022-08-31T18:59:48+0200
However git tag
returns multiple tags in develop
branch. What might be wrong?
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
get_version() returns 0+untagged, even when there are many ...
The documentation just basically assumes that versioneer will, like magic, pick up the output of git describe. It's just not the case for...
Read more >versioneer — NiftyNet 0.6.0 documentation - Read the Docs
Debugging Versioneer tries to avoid fatal errors: if something goes wrong, it will tend to return a version of "0+unknown". To investigate the...
Read more >Version String Management in Python - The Mozilla Blog
Version String Management in Python: Introducing python-versioneer. What's a good way to manage version numbers in a Python project?
Read more >versioneer - PyPI
The "classic" vendored mode installs a copy of versioneer into your repository. ... Both functions return a dictionary with different flavors of version ......
Read more >Python Versioneer is not generating a -version.py file
I had that problem with a similar setup.cfg file, but in a tiny project with no nested directories and I ended up needing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Versioneer is really only set up to work with PEP-440 tags, so your dev-branch marking tag could become something like
2.0.1.dev1
. From there, versioneer would create versions like2.0.1.dev1+1.gd91a1f1
.If you want to keep your current tag style, you’re going to need a different tool (or contribute a patch here…). versioningit does have a lot of flexibility here. See https://versioningit.readthedocs.io/en/stable/configuration.html#the-tool-versioningit-tag2version-subtable
You’re going to need your
tag_prefix = v
. Once, you do that (and reinstall_version.py
), you should get something like:This isn’t PEP-440 compliant, but there is no way in versioneer to strip off the
-develop.1
suffix. Other tools like versioningit or setuptools_scm might have that kind of feature.