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
Make the documentation reproducible #1265
Make the documentation reproducible #1265
Conversation
Whilst working on the Reproducible Builds effort [0] we noticed that pyqtgraph could not be built reproducibly. This is because it generates copyright years from the current build date and therefore will vary on when you build it. This commit uses SOURCE_DATE_EPOCH [1] for the "current" build date. This was originally filed in Debian as #963124 [2]. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ [2] https://bugs.debian.org/963124
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question for anyone: does this warrant a quick 0.11.1 release?
| @@ -46,7 +47,10 @@ | |||
|
|
|||
| # General information about the project. | |||
| project = 'pyqtgraph' | |||
| copyright = '2011 - {}, Luke Campagnola'.format(datetime.now().year) | |||
| now = datetime.utcfromtimestamp( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a note in the datetime.utcfromtimestamp docs that datetime.fromtimestamp(timestamp, timezone.utc) may be preferred to utcfromtimestamp. It seems like the year attribute would be safe from the issues they're warning against, so I'd defer to Debian folks on this -- if this is the usual approach for python projects, I'm fine with it.
Also, it might be good to have a brief comment above this line indicating that getting the date in this way is for reproducible builds. Just a link to SOURCE_DATE_EPOCH would probably suffice. I see it's already in the commit message, but I think having it here in the code wouldn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I've been fixing it for a long time now with no issue, if that helps.
|
@ksunden would be the person to talk to about releases. I'm good w/ doing another release, a decent number of PRs have been merged since 0.11.0, and one segfault has been fixed. |
|
Happy to do a release whenever we want |
|
Merging! Thanks for the PR @lamby |
Whilst working on the Reproducible Builds effort we noticed that pyqtgraph could not be built reproducibly. This is because it generates copyright years from the current build date and therefore will vary on when you build it.
This commit uses
SOURCE_DATE_EPOCHfor the "current" build date.This was originally filed in Debian as #963124.