A new user interface for you! Read more...

File reproducible-epub.patch of Package python-Sphinx

Index: Sphinx-1.6.3/sphinx/builders/_epub_base.py
===================================================================
--- Sphinx-1.6.3.orig/sphinx/builders/_epub_base.py
+++ Sphinx-1.6.3/sphinx/builders/_epub_base.py
@@ -12,7 +12,8 @@
 import os
 import re
 from os import path
-from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
+from sphinx.util.i18n import format_date
+from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile, ZipInfo
 from datetime import datetime
 from collections import namedtuple
 
@@ -486,7 +487,7 @@ class EpubBuilder(StandaloneHTMLBuilder)
         metadata['copyright'] = self.esc(self.config.epub_copyright)
         metadata['scheme'] = self.esc(self.config.epub_scheme)
         metadata['id'] = self.esc(self.config.epub_identifier)
-        metadata['date'] = self.esc(datetime.utcnow().strftime("%Y-%m-%d"))
+        metadata['date'] = self.esc(format_date("%Y-%m-%d"))
         metadata['manifest_items'] = []
         metadata['spines'] = []
         metadata['guides'] = []
@@ -513,6 +514,7 @@ class EpubBuilder(StandaloneHTMLBuilder)
         if not self.use_index:
             self.ignored_files.append('genindex' + self.out_suffix)
         for root, dirs, files in os.walk(outdir):
+            dirs.sort()
             for fn in sorted(files):
                 filename = path.join(root, fn)[olen:]
                 if filename in self.ignored_files:
Index: Sphinx-1.6.3/sphinx/builders/epub3.py
===================================================================
--- Sphinx-1.6.3.orig/sphinx/builders/epub3.py
+++ Sphinx-1.6.3/sphinx/builders/epub3.py
@@ -19,6 +19,7 @@ from sphinx.config import string_classes
 from sphinx.builders import _epub_base
 from sphinx.util import logging, xmlname_checker
 from sphinx.util.fileutil import copy_asset_file
+from sphinx.util.i18n import format_date
 
 if False:
     # For type annotation
@@ -132,7 +133,7 @@ class Epub3Builder(_epub_base.EpubBuilde
         metadata['contributor'] = self.esc(self.config.epub_contributor)
         metadata['page_progression_direction'] = PAGE_PROGRESSION_DIRECTIONS.get(writing_mode)
         metadata['ibook_scroll_axis'] = IBOOK_SCROLL_AXIS.get(writing_mode)
-        metadata['date'] = self.esc(datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ"))
+        metadata['date'] = self.esc(format_date("%Y-%m-%dT%H:%M:%SZ"))
         metadata['version'] = self.esc(self.config.version)
         return metadata