Skip to content
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

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Jun 19, 2020

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_EPOCH for the "current" build date.

This was originally filed in Debian as #963124.

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
@j9ac9k
Copy link
Member

j9ac9k commented Jun 19, 2020

Hi @lamby thanks for the PR, this looks good to me, but before merging, I'm going to ask @ixjlyons to take a look at it as he's been the person that's got our documentation system up and running.

@j9ac9k j9ac9k requested a review from ixjlyons June 19, 2020 19:19
Copy link
Member

@ixjlyons ixjlyons left a 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(
Copy link
Member

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.

Copy link
Contributor Author

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. 👍

@j9ac9k
Copy link
Member

j9ac9k commented Jun 19, 2020

@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.

@ksunden
Copy link
Contributor

ksunden commented Jun 20, 2020

Happy to do a release whenever we want

@j9ac9k
Copy link
Member

j9ac9k commented Jun 20, 2020

Merging! Thanks for the PR @lamby

@j9ac9k j9ac9k merged commit f5b8a15 into pyqtgraph:master Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants