New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hidden files no longer required for git archive? #793
Comments
more context is needed, classically git does not include the metadata needed to do this, so please show how you actually build things in a way i can repeat directly |
I'm sorry, I was not paying attention and missed this question. I'm building the project with |
@kwinkunks basically these files are needed for when someone pulls a git tag download |
Okay, I think I understand. Thank you for explaining that. So since the artifacts include the metadata (I now see the version in PKG-INFO and in the wheel metadata), why do I need setuptools_scm to write to the |
the _version.py file is commonly used as importing a module sometimes is orders of magnitude faster than loading the package metadata in the old pkg_resources times loading the metadata could be as expensive as 0.2 seconds or even more which is absolute horrendous when you want very quick cli commands even with importlib.metadata the delay can be noticeable |
Wonderful, thank you for the clarification 🙌 I will close this issue if there's no objection. |
In the docs under Git archives, it states that in order for the version number to be retrieved from tags, some special content is required in 2 files:
.git_archival.txt
and.gitattributes
.However, after comparing notes with a colleague, it seems like the two files might not actually be required. I tried removing them and I think everything is working properly. Am I missing something, or can these files be dispensed with now?
The project I'm building: https://github.com/kwinkunks/unmap (except without those 2 files)
The content of
unmap/_version.py
(which is not in the archive) is being updated, e.g.:The versioning code is in
unmap/__init__.py
.The text was updated successfully, but these errors were encountered: