[Python-modules-commits] [python-mkdocs] 02/03: merge patched into master

Brian May bam at moszumanska.debian.org
Thu Jul 28 22:11:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch master
in repository python-mkdocs.

commit cef69e2ec6e4fe78e4698503a7c21556cef9244a
Merge: 51f5e2e f37eb5e
Author: Brian May <bam at debian.org>
Date:   Fri Jul 29 08:08:02 2016 +1000

    merge patched into master

 debian/.git-dpm                                    |  4 +-
 .../patches/0003-Support-reproducible-builds.patch | 49 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 mkdocs/commands/build.py                           |  3 +-
 mkdocs/nav.py                                      |  6 ++-
 5 files changed, 59 insertions(+), 4 deletions(-)

diff --cc debian/.git-dpm
index 995fcb6,0000000..d6b494c
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 31150740d5b7b66013f63192aced354883cb5022
- 31150740d5b7b66013f63192aced354883cb5022
++f37eb5e81c996800e2e69180fa225dfef3943c84
++f37eb5e81c996800e2e69180fa225dfef3943c84
 +47dd578a2b91cacc50aec47aff24b7b75581e08a
 +47dd578a2b91cacc50aec47aff24b7b75581e08a
 +python-mkdocs_0.15.3.orig.tar.gz
 +544760693a444da8f7b005ddc69b30e8ad69f3df
 +1805972
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/0003-Support-reproducible-builds.patch
index 0000000,0000000..3e3c627
new file mode 100644
--- /dev/null
+++ b/debian/patches/0003-Support-reproducible-builds.patch
@@@ -1,0 -1,0 +1,49 @@@
++From f37eb5e81c996800e2e69180fa225dfef3943c84 Mon Sep 17 00:00:00 2001
++From: Brian May <bam at debian.org>
++Date: Fri, 29 Jul 2016 08:06:08 +1000
++Subject: Support reproducible builds
++
++See https://github.com/mkdocs/mkdocs/issues/938
++---
++ mkdocs/commands/build.py | 3 ++-
++ mkdocs/nav.py            | 6 +++++-
++ 2 files changed, 7 insertions(+), 2 deletions(-)
++
++diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
++index 614173d..66fef62 100644
++--- a/mkdocs/commands/build.py
+++++ b/mkdocs/commands/build.py
++@@ -5,6 +5,7 @@ from datetime import datetime
++ import io
++ import logging
++ import os
+++import time
++ 
++ from jinja2.exceptions import TemplateNotFound
++ import jinja2
++@@ -83,7 +84,7 @@ def get_global_context(nav, config):
++         'google_analytics': config['google_analytics'],
++ 
++         'mkdocs_version': mkdocs.__version__,
++-        'build_date_utc': datetime.utcnow(),
+++        'build_date_utc': datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))),
++ 
++         'config': config
++     }
++diff --git a/mkdocs/nav.py b/mkdocs/nav.py
++index b72e21f..07f6505 100644
++--- a/mkdocs/nav.py
+++++ b/mkdocs/nav.py
++@@ -137,7 +137,11 @@ class Page(object):
++         self.abs_url = url
++         self.active = False
++         self.url_context = url_context
++-        self.update_date = datetime.datetime.now().strftime("%Y-%m-%d")
+++
+++        try:
+++            self.update_date = datetime.datetime.utcfromtimestamp(int(os.environ['SOURCE_DATE_EPOCH']))
+++        except KeyError:
+++            self.update_date = datetime.datetime.now().strftime("%Y-%m-%d")
++ 
++         # Relative paths to the input markdown file and output html file.
++         self.input_path = path
diff --cc debian/patches/series
index b5c3a9b,0000000..4c890a2
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,2 -1,0 +1,3 @@@
 +0001-Remove-faulty-tests.patch
 +0002-Use-themes-from-usr-share-mkdocs-themes.patch
++0003-Support-reproducible-builds.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mkdocs.git



More information about the Python-modules-commits mailing list