setuptools_scm
setuptools_scm copied to clipboard
question about GitWorkdir.is_dirty
Hello,
First of all, thanks for this project. I think that taking versions from the VCS is an essential feature.
I was doing some experiments, specially using editable pip installs (but it applies to normal installs as well), and I saw that when one installs from a source repository that has untracked files, the release version in "clean". I saw that this was encoded on purpose by adding --untracked-files=no to the porcelain command. What is the reason behind this? If I have an untracked file called foo.py in my source directory, that file is present on the installed package (i.e., in site-packages) so in practice that install is not version x.y.z, but x.y.z-dirty. Perhaps I am missing something.
Thanks in advance, João
i beleivethis is a potential oversight for accounting of version files
I think the fix would be to remove the --untracked-files=no from that function, but I don't have the overview to see what other possible impacts.
i did some digging, it was added to be in line with git describe
more work is needed to determine where to add this
I see. It is true that, if the term "dirty" is taken from the git describe, it does not account for untracked files. But I believe the automatic version generation should have a way to account for the untracked files as well, since in fact they go with the installation, even if the term should be something else.
In that case, we cannot use git describe as is anyway
So more investigation is required before changing
Sure, makes sense. I may be able to contribute about this in the future if that's an option.
sure, i wont be able to work on this soonish
Hi,
Please feel free to close if you think it's the best. I've changed from setuptools_scm to bumpver and I'll focus more on that tool.
Thank you for the feedback to my question,
João