Fix SOURCE_DATE_EPOCH for multi-line copyright values#11516
Fix SOURCE_DATE_EPOCH for multi-line copyright values#11516picnixz wants to merge 1 commit intosphinx-doc:masterfrom
SOURCE_DATE_EPOCH for multi-line copyright values#11516Conversation
|
I'm not sure it's a good practice to read copyright year information from environment variables, since copyright is a static property of the authored code, and in contrast environment variables can be configured on a system-by-system basis. |
|
Actually, the copyright is not always static. It's common to have the copyright going from some static year to current year. The use of |
|
|
|
What I meant is that there are configuration files where the copyright value is dynamic and may change depending on when you build the configuration. With reproducible builds, you want it to be the same, independently of whether you are building it today or in 1000 years. Maybe I am misunderstanding your point, but Sphinx is incorporated into workflows where the copyright is declared as something like By the way, |
|
Ok, yep. I was being stubborn; basically I question the robustness of dynamic copyright statements - I think that instead, they should be static, human-written statements about a work. But since they do exist, and because I'm not a lawyer, we should fix any bugs in the behaviour of them. So I'll step aside from this. |
Closes #11514
@AA-Turner When implementing this patch, I found that there is also a configuration value
project_copyrightwhich is not updated according toSOURCE_DATE_EPOCH. Thecopyrightvalue is by default set toproject_copyright, but should we also change theproject_copyrightaccording toSOURCE_DATE_EPOCH? It also appears thatproject_copyrightis never used elsewhere but is documented as an alias ofcopyright(which is actually not true sincecopyrightis the one being aliased by default):sphinx/sphinx/config.py
Lines 94 to 95 in 5cf3dce
However, in order to make things right, we need to change the implementation of
Configfor theproject_copyrightentry, but I'm not sure whether this may break projects in general.