-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Expand write_to_template to permit commit hash and date #818
Comments
There is a wish to add the scm version Generating copyright based on recent dates is fundamentally broken In particular it is absolutely useless for a autogenerated file I recommend spdx aware pre commit hooks |
@effigies also important warning - copyright does not start at the commit date - it can t best be used as the end of a range, else its wrong data |
Fair points. Thanks for the feedback on the idea and apologies for leaving this open so long. |
This is still planned as feature |
It semms #854 can only help in terms of node. Maybe we need a new function like |
Date objects can uses strftime Style Formats in Format specifiers |
Ahhhh right! I've never noticed this behaviour before. |
closing this as solves as the scm version is passed now |
While shifting a project to setuptools_scm, I saw someone ask if they could generate a copyright field dynamically based on the current year. Something like:
Obviously this would be bad, as the copyright would apply to the most recent change to the source code, not time of import. This information is available to setuptools_scm, and it could be useful to permit something like the following:
Is there any appetite to permit additional SCM-derived data in the generated file? I would imagine anything available in the
ScmVersion
data class would be potentially useful. Beyond saving a chore, generating more detailed bug report templates are the main other use case I can think of.Anyway, any appetite for this? It could be done in a separate build tool plugin, but it would be nice to consolidate interaction with the SCM to a single utility.
The text was updated successfully, but these errors were encountered: