Repository navigation
Config: native 'SOURCE_DATE_EPOCH' pattern-replacement support - #13538
Open
jayaddison wants to merge 17 commits into
Open
jayaddison wants to merge 17 commits into
jayaddison wants to merge 17 commits into
Conversation
… discussion-13526/copyright-patterns-support-source-date-epoch
Relates-to commit de4af25.
… discussion-13526/copyright-patterns-support-source-date-epoch
…t-source-date-epoch
Member
|
don't worry about merging master, it takes up CI resource, we have a limit of ~15(?) concurrent jobs on the whole organisation |
jayaddison
commented
May 12, 2025
…t-source-date-epoch
…t-source-date-epoch
…t-source-date-epoch Conflicts: CHANGES.rst
…ATE_EPOCH` is enabled` Ref: sphinx-doc#13538 (review)
Contributor
Author
|
@AA-Turner I think this is ready, if/when you have time for another review. |
…t-source-date-epoch
…t-source-date-epoch
…t-source-date-epoch
…t-source-date-epoch
…t-source-date-epoch Conflicts: CHANGES.rst
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Sphinx provides support for a
%Yyear-substitution pattern that dynamically places the publication year into thecopyrightandproject_copyrightconfiguration settings.Additionally, we attempt to support reproducible builds when possible, using the
SOURCE_DATE_EPOCHenvironment variable.Previously, it was possible in some cases for
%Yvalues to be replaced with reproducible output when the settings produced byevaluate_copyright_placeholderswere compatible with the patterns matched by the subsequently-runcorrect_copyright_yearmethod. In particular, this required use of ASCII hyphens as year-range separators (e.g.2000-%Ywould accept and allow publication year replacement since it uses an ASCII hyphen, but2000–%Ywould not, because that latter string uses an en-dash character as the range indicator).To remove the requirement that these two methods are interleaved to function correctly, and to allow
evaluate_copyright_placeholdersto emit reproducible results for more-general-case patterns, allow that method to supportSOURCE_DATE_EPOCHinternally.References
Also depends upon a small fixup from #13537 to ensure that the test suite passes reliably when run in entirety.