Bug#882578: pymongo: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Nov 24 06:03:20 UTC 2017
Source: pymongo
Version: 3.5.1+dfsg1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that pymongo could not be built reproducibly.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
diff --git a/doc/conf.py b/doc/conf.py
index 676e876..b15e49c 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -9,7 +9,7 @@ sys.path[0:0] = [os.path.abspath('..')]
import pymongo
-import datetime
+import time, datetime
# -- General configuration -----------------------------------------------------
@@ -28,9 +28,12 @@ source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
+build_date = datetime.datetime.utcfromtimestamp(
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
+
# General information about the project.
project = u'PyMongo'
-copyright = u'MongoDB, Inc. 2008-{0}. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc'.format(datetime.date.today().year)
+copyright = u'MongoDB, Inc. 2008-{0}. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc'.format(build_date.year)
html_show_sphinx = False
# The version info for the project you're documenting, acts as replacement for
More information about the Reproducible-bugs
mailing list