Repository navigation
Merged
Conversation
| # correct values of copyright year that are not coherent with | ||
| # the SOURCE_DATE_EPOCH environment variable: | ||
| if getenv('SOURCE_DATE_EPOCH') is not None: | ||
| for k in ['copyright','epub_copyright']: |
Contributor
There was a problem hiding this comment.
Minor nit: you can use tuple instead of a list here.
* use tuple instead of list * compile regex to find copyright year * enclose test inside try/finally
Author
Contributor
|
PEP-8-ifying the files won't hurt, but in general looks fine. 👍 Oh, and maybe you can include a link to https://reproducible-builds.org/specs/source-date-epoch/ in the comments somewhere? |
Author
|
@mitya57 : oh yes, that was missing! |
Member
|
LGTM! I will merge this within a day if no objection :-) |
Author
|
Thanks for your support! |
Member
|
Merged! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The SOURCE_DATE_EPOCH support is very important for reproducible builds of packages that use sphinx for their documentation.
copyright = u'2006-%s, Author' % time.strftime('%Y')This breaks reproducibility, with an artificial copyright date related to build time instead of source date. I suggest to use SOURCE_DATE_EPOCH (when set) to correct these dates automatically.
sphinx/util/i18n.py, thedate = gmtime(float(source_date_epoch))definition leads to an error when passed tobabel.dates.format_date, that needs adateordatetimeobject (maybe my setup? I use babel 1.3), so I replaced it with an equivalentdatetimecall.