Closed henryiii closed 3 years ago
Thank you for looking into the issue and thank you for the PR. I am a bit thorn between the proposed fix and fixing the parsing. I'd probably like the tarball and github tag to generate the same version.
Feel free to fix as you see fit. I’m rather assuming here that the git hash and revision count are removed later if the count is 0 (that might depend on how you handle dirty working trees).
As pointed out in https://github.com/FFY00/trampolim/pull/5#issuecomment-923372306, I will pull setuptools_scm
as a dependency, which should fix this.
Okay, let me know when there's a fix. :)
This line breaks when this matches a tag exactly (which it usually should do if you are building wheels and SDists for publication?)
https://github.com/FFY00/trampolim/blob/f3e8db8dea5607f708208b57de0d8bc49348a9d1/trampolim/_build.py#L290
You want
--long
to force the commits since tag and current hash. Or you should check to see if-
's are present, then assume it's exactly a release then.Example failure from a nox run using scikit-hep/cookie:
This works correctly in setuptools_scm.