setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

How to make fail when not tag is available?

Open mithro opened this issue 4 years ago • 1 comments
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.

mithro avatar Mar 18 '21 18:03 mithro

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

RonnyPfannschmidt avatar Mar 18 '21 20:03 RonnyPfannschmidt