[Python-modules-commits] [flask] 01/03: Use SOURCE_DATE_EPOCH for copyright year to make build reproducible
Ondřej Nový
onovy at moszumanska.debian.org
Fri Jan 13 13:33:48 UTC 2017
This is an automated email from the git hooks/post-receive script.
onovy pushed a commit to branch master
in repository flask.
commit 0c0b1484f295f248f6c646b410d41674fa32f529
Author: Ondřej Nový <onovy at debian.org>
Date: Fri Jan 13 10:46:21 2017 +0100
Use SOURCE_DATE_EPOCH for copyright year to make build reproducible
---
docs/conf.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index b37427a..81106a3 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,10 +11,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
from __future__ import print_function
-from datetime import datetime
import os
import sys
import pkg_resources
+import time
+import datetime
+
+BUILD_DATE = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -49,7 +52,7 @@ master_doc = 'index'
# General information about the project.
project = u'Flask'
-copyright = u'2010 - {0}, Armin Ronacher'.format(datetime.utcnow().year)
+copyright = u'2010 - {0}, Armin Ronacher'.format(BUILD_DATE.year)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/flask.git
More information about the Python-modules-commits
mailing list