setuptools_scm
setuptools_scm copied to clipboard
How to make fail when not tag is available?
trafficstars
If you do a git clone with a limited fetch depth so that you don't end up with any tags in your repository, setuptools_scm will happy generate a very confusing version number. I would like it to instead fail loudly (and tell the person how to fix their git repository to have a tag).
Any idea how I can do this? Thanks!
PS This would probably be a much better default option for setuptools_scm.
there is a included utility in https://github.com/pypa/setuptools_scm/blob/abb67b15985f380d8cf4451b9f2ef3dd11cb8a91/src/setuptools_scm/git.py#L85-L108
its currently not nicely exposed