[Python-modules-commits] [sphinx] 12/12: merge patched into master
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Thu Jan 14 15:59:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
mitya57 pushed a commit to branch master
in repository sphinx.
commit 9ebb38aba107d7052f16a719c4db38f23fc2cee7
Merge: 3f4ad44 042799f
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Thu Jan 14 18:58:15 2016 +0300
merge patched into master
CHANGES | 74 ++++++-
PKG-INFO | 2 +-
Sphinx.egg-info/PKG-INFO | 2 +-
Sphinx.egg-info/SOURCES.txt | 32 +++
Sphinx.egg-info/requires.txt | 2 +-
debian/.git-dpm | 6 +-
debian/patches/disable_distribute_setup.diff | 4 +-
debian/patches/disable_js_version_check.diff | 2 +-
debian/patches/no_external_css.diff | 2 +-
debian/patches/no_snowballstemmer.diff | 6 +-
debian/patches/reproducible_grammar.diff | 2 +-
debian/patches/reproducible_inventory.diff | 2 +-
debian/patches/reproducible_js_locale.diff | 4 +-
debian/patches/reproducible_searchindex.diff | 2 +-
debian/patches/source_date_epoch.diff | 2 +-
doc/_templates/index.html | 8 +-
doc/_templates/indexsidebar.html | 8 -
doc/config.rst | 8 +-
doc/domains.rst | 2 +-
doc/ext/graphviz.rst | 17 +-
doc/ext/math.rst | 4 +-
doc/ext/viewcode.rst | 6 +-
doc/extdev/appapi.rst | 2 +-
doc/extdev/envapi.rst | 6 +-
doc/intl.rst | 2 +-
doc/markup/inline.rst | 5 +-
doc/tutorial.rst | 5 +-
doc/web/quickstart.rst | 2 +-
setup.py | 4 +-
sphinx/__init__.py | 6 +-
sphinx/apidoc.py | 10 +
sphinx/builders/__init__.py | 3 +-
sphinx/builders/latex.py | 17 +-
sphinx/builders/linkcheck.py | 31 +--
sphinx/cmdline.py | 4 +
sphinx/domains/cpp.py | 12 ++
sphinx/domains/std.py | 36 ++--
sphinx/environment.py | 79 +++-----
sphinx/ext/doctest.py | 18 +-
sphinx/ext/graphviz.py | 3 +-
sphinx/ext/inheritance_diagram.py | 17 +-
sphinx/ext/jsmath.py | 2 +-
sphinx/ext/mathbase.py | 19 +-
sphinx/ext/mathjax.py | 2 +-
sphinx/quickstart.py | 48 +++--
sphinx/search/de.py | 1 +
sphinx/search/ja.py | 10 +-
sphinx/texinputs/sphinx.sty | 36 ++--
sphinx/themes/classic/static/classic.css_t | 2 +-
sphinx/util/__init__.py | 11 +
sphinx/util/docfields.py | 5 +-
sphinx/util/nodes.py | 6 +-
sphinx/util/parallel.py | 107 +++++-----
sphinx/writers/latex.py | 221 +++++++++++++++++----
sphinx/writers/manpage.py | 32 +++
sphinx/writers/text.py | 4 +-
tests/path.py | 31 ++-
tests/root/images.txt | 3 +
tests/root/img.foo.png | Bin 0 -> 67765 bytes
tests/root/markup.txt | 9 +
tests/root/math.txt | 15 +-
tests/root/objects.txt | 12 +-
tests/roots/test-autosummary/conf.py | 2 +
tests/roots/test-build-text/conf.py | 1 +
tests/roots/test-circular/conf.py | 1 +
tests/roots/test-contentsname/conf.py | 1 +
tests/roots/test-directive-code/conf.py | 1 +
tests/roots/test-directive-only/conf.py | 1 +
tests/roots/test-doctest/conf.py | 3 +-
tests/roots/test-doctest/doctest.txt | 11 +
tests/roots/test-docutilsconf/conf.py | 1 +
tests/roots/test-domain-cpp/any-role.rst | 10 +
.../{test-tocdepth => test-domain-cpp}/conf.py | 1 +
tests/roots/test-domain-cpp/index.rst | 37 ++++
tests/roots/test-domain-cpp/roles.rst | 10 +
tests/roots/test-double-inheriting-theme/conf.py | 1 +
tests/roots/test-ext-graphviz/conf.py | 1 +
tests/roots/test-ext-ifconfig/conf.py | 1 +
tests/roots/test-ext-viewcode/conf.py | 1 +
.../{test-tocdepth => test-footnotes}/conf.py | 1 +
tests/roots/test-footnotes/index.rst | 142 +++++++++++++
tests/roots/test-footnotes/rimg.png | Bin 0 -> 218 bytes
tests/roots/test-image-in-section/conf.py | 12 ++
tests/roots/test-image-in-section/index.rst | 18 ++
tests/roots/test-image-in-section/pic.png | Bin 0 -> 218 bytes
tests/roots/test-intl/conf.py | 1 +
tests/roots/test-intl/definition_terms.po | 8 +-
tests/roots/test-intl/definition_terms.txt | 4 +-
tests/roots/test-numbered-circular/conf.py | 1 +
tests/roots/test-numfig/conf.py | 1 +
tests/roots/test-setup/doc/conf.py | 1 +
tests/roots/test-templating/conf.py | 1 +
tests/roots/test-theming/conf.py | 1 +
tests/roots/test-tocdepth/conf.py | 1 +
tests/roots/test-toctree-glob/bar/bar_1.rst | 4 +
tests/roots/test-toctree-glob/bar/bar_2.rst | 4 +
tests/roots/test-toctree-glob/bar/bar_3.rst | 4 +
tests/roots/test-toctree-glob/bar/bar_4/index.rst | 4 +
tests/roots/test-toctree-glob/bar/index.rst | 8 +
tests/roots/test-toctree-glob/baz.rst | 4 +
.../{test-tocdepth => test-toctree-glob}/conf.py | 1 +
tests/roots/test-toctree-glob/foo.rst | 4 +
tests/roots/test-toctree-glob/index.rst | 11 +
tests/roots/test-toctree-glob/quux.rst | 4 +
tests/roots/test-toctree-glob/qux/index.rst | 8 +
tests/roots/test-toctree-glob/qux/qux_1.rst | 4 +
tests/roots/test-toctree-glob/qux/qux_2.rst | 4 +
tests/roots/test-toctree-maxdepth/bar.rst | 27 +++
tests/roots/test-toctree-maxdepth/baz.rst | 5 +
.../conf.py | 1 +
tests/roots/test-toctree-maxdepth/foo.rst | 26 +++
tests/roots/test-toctree-maxdepth/index.rst | 9 +
tests/roots/test-versioning/conf.py | 1 +
tests/test_apidoc.py | 41 ++++
tests/test_build.py | 17 +-
tests/test_build_html.py | 79 ++++----
tests/test_build_latex.py | 169 +++++++++++++++-
tests/test_build_manpage.py | 22 ++
tests/test_build_texinfo.py | 2 +-
tests/test_directive_code.py | 4 +-
tests/test_domain_cpp.py | 50 ++++-
tests/test_environment.py | 10 +-
tests/test_intl.py | 41 +++-
tests/test_toctree.py | 29 +++
tests/test_util.py | 26 +++
tests/test_util_i18n.py | 3 +-
utils/check_sources.py | 2 +-
127 files changed, 1535 insertions(+), 404 deletions(-)
diff --cc debian/.git-dpm
index 868af57,0000000..8fce602
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
- 34b8575ce2dce459aa29179c9ea4f45351ddc8c8
- 34b8575ce2dce459aa29179c9ea4f45351ddc8c8
- 0d21a8c899c1d9102b90b3243f9fec4c9e7a8f3d
++042799fd684c6095a6dc57db17a99edd4201212a
++042799fd684c6095a6dc57db17a99edd4201212a
++caededb0f2c03d23ce5f20fb19c602ab6c8ba4ea
+caededb0f2c03d23ce5f20fb19c602ab6c8ba4ea
+sphinx_1.3.4.orig.tar.gz
+3d54fbb8e188ee2435995d936dea9f7c17f6c9c0
+3679247
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/disable_distribute_setup.diff
index c36c008,0000000..f02c64b
mode 100644,000000..100644
--- a/debian/patches/disable_distribute_setup.diff
+++ b/debian/patches/disable_distribute_setup.diff
@@@ -1,26 -1,0 +1,26 @@@
- From 9336ac3e36d1b2ed061cecf7bf03812108c38640 Mon Sep 17 00:00:00 2001
++From 37add41cf3b82d60a679493599391a244e025251 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk at debian.org>
+Date: Thu, 8 Oct 2015 13:58:02 -0700
+Subject: disable use of distribute_setup, which bootstraps distribute
+ installation
+
+Forwarded: not-needed
+Last-Update: 2013-10-05
+
+Patch-Name: disable_distribute_setup.diff
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
- index 6bc2887..d44e8a9 100644
++index 4ff6315..b556549 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2,6 +2,7 @@
+ try:
+ from setuptools import setup, find_packages
+ except ImportError:
++ raise
+ import ez_setup
+ ez_setup.use_setuptools()
+ from setuptools import setup, find_packages
diff --cc debian/patches/disable_js_version_check.diff
index 707e8d5,0000000..0440cd3
mode 100644,000000..100644
--- a/debian/patches/disable_js_version_check.diff
+++ b/debian/patches/disable_js_version_check.diff
@@@ -1,33 -1,0 +1,33 @@@
- From 6cdc150881d7826db2a93993e4ec0bc266e53757 Mon Sep 17 00:00:00 2001
++From 3255c124b03293c6b7b1dc4206f61e18ee4cba50 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57 at debian.org>
+Date: Thu, 8 Oct 2015 13:58:04 -0700
+Subject: disable a test that checks versions of JS libraries
+
+Forwarded: not-needed
+Last-Update: 2015-04-10
+
+Patch-Name: disable_js_version_check.diff
+---
+ tests/test_theming.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/test_theming.py b/tests/test_theming.py
+index 3467ca2..db5c527 100644
+--- a/tests/test_theming.py
++++ b/tests/test_theming.py
+@@ -11,6 +11,7 @@
+
+ import os
+ import zipfile
++import unittest
+
+ from sphinx.theming import Theme, ThemeError
+
+@@ -57,6 +58,7 @@ def test_theme_api(app, status, warning):
+ assert not os.path.exists(themedir)
+
+
++ at unittest.skip('In Debian we use packaged JS libraries')
+ @with_app(testroot='tocdepth') # a minimal root
+ def test_js_source(app, status, warning):
+ # Now sphinx provides non-minified JS files for jquery.js and underscore.js
diff --cc debian/patches/no_external_css.diff
index dcb838b,0000000..cb9eb48
mode 100644,000000..100644
--- a/debian/patches/no_external_css.diff
+++ b/debian/patches/no_external_css.diff
@@@ -1,40 -1,0 +1,40 @@@
- From 9a8b47596dc973b6bd54f2abb569eae9c0048e04 Mon Sep 17 00:00:00 2001
++From 2a30151c53ad81bee85bd70c80e7492f5664e909 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk at debian.org>
+Date: Thu, 8 Oct 2015 13:58:03 -0700
+Subject: don't use CSS files hosted on external sites
+
+Forwarded: no
+Last-Update: 2013-04-08
+
+Patch-Name: no_external_css.diff
+---
+ doc/_themes/sphinx13/layout.html | 2 --
+ sphinx/themes/pyramid/layout.html | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/doc/_themes/sphinx13/layout.html b/doc/_themes/sphinx13/layout.html
+index 0e6294c..3c2a2db 100644
+--- a/doc/_themes/sphinx13/layout.html
++++ b/doc/_themes/sphinx13/layout.html
+@@ -14,8 +14,6 @@
+ {% block sidebar2 %}{% endblock %}
+
+ {% block extrahead %}
+- <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,700'
+- rel='stylesheet' type='text/css' />
+ {{ super() }}
+ {%- if not embedded %}
+ <style type="text/css">
+diff --git a/sphinx/themes/pyramid/layout.html b/sphinx/themes/pyramid/layout.html
+index 318a366..be95248 100644
+--- a/sphinx/themes/pyramid/layout.html
++++ b/sphinx/themes/pyramid/layout.html
+@@ -1,8 +1,6 @@
+ {%- extends "basic/layout.html" %}
+
+ {%- block extrahead %}
+-<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton&subset=latin" type="text/css" media="screen" charset="utf-8" />
+-<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="{{ pathto('_static/ie6.css', 1) }}" type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
diff --cc debian/patches/no_snowballstemmer.diff
index ff2dd10,0000000..a519987
mode 100644,000000..100644
--- a/debian/patches/no_snowballstemmer.diff
+++ b/debian/patches/no_snowballstemmer.diff
@@@ -1,80 -1,0 +1,80 @@@
- From 419947c3e66ccc86a7d215002a4c15f7a0f039e0 Mon Sep 17 00:00:00 2001
++From c02d73aa416b43613b6400c1cbf3748630509f6e Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57 at debian.org>
+Date: Thu, 8 Oct 2015 13:58:05 -0700
+Subject: do not support snowballstemmer-based search for now
+
+Forwarded: not-needed
+Last-Update: 2015-05-08
+
+Patch-Name: no_snowballstemmer.diff
+---
+ Sphinx.egg-info/requires.txt | 1 -
+ setup.py | 1 -
+ sphinx/search/__init__.py | 14 --------------
+ tests/run.py | 2 +-
+ 4 files changed, 1 insertion(+), 17 deletions(-)
+
+diff --git a/Sphinx.egg-info/requires.txt b/Sphinx.egg-info/requires.txt
- index 5100b88..db64611 100644
++index 8b45115..936c824 100644
+--- a/Sphinx.egg-info/requires.txt
++++ b/Sphinx.egg-info/requires.txt
+@@ -2,7 +2,6 @@ six>=1.4
+ Jinja2>=2.3
+ Pygments>=2.0
+ docutils>=0.11
+-snowballstemmer>=1.1
+ babel>=1.3,!=2.0
+ alabaster>=0.7,<0.8
+ sphinx_rtd_theme>=0.1,<2.0
+diff --git a/setup.py b/setup.py
- index d44e8a9..d0d4bb6 100644
++index b556549..e656779 100644
+--- a/setup.py
++++ b/setup.py
+@@ -51,7 +51,6 @@ requires = [
+ 'Jinja2>=2.3',
+ 'Pygments>=2.0',
+ 'docutils>=0.11',
+- 'snowballstemmer>=1.1',
+ 'babel>=1.3,!=2.0',
+ 'alabaster>=0.7,<0.8',
+ 'sphinx_rtd_theme>=0.1,<2.0',
+diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py
+index e248088..d83d1f6 100644
+--- a/sphinx/search/__init__.py
++++ b/sphinx/search/__init__.py
+@@ -119,22 +119,8 @@ def parse_stop_word(source):
+
+ # maps language name to module.class or directly a class
+ languages = {
+- 'da': 'sphinx.search.da.SearchDanish',
+- 'de': 'sphinx.search.de.SearchGerman',
+ 'en': SearchEnglish,
+- 'es': 'sphinx.search.es.SearchSpanish',
+- 'fi': 'sphinx.search.fi.SearchFinnish',
+- 'fr': 'sphinx.search.fr.SearchFrench',
+- 'hu': 'sphinx.search.hu.SearchHungarian',
+- 'it': 'sphinx.search.it.SearchItalian',
+ 'ja': 'sphinx.search.ja.SearchJapanese',
+- 'nl': 'sphinx.search.nl.SearchDutch',
+- 'no': 'sphinx.search.no.SearchNorwegian',
+- 'pt': 'sphinx.search.pt.SearchPortuguese',
+- 'ro': 'sphinx.search.ro.SearchRomanian',
+- 'ru': 'sphinx.search.ru.SearchRussian',
+- 'sv': 'sphinx.search.sv.SearchSwedish',
+- 'tr': 'sphinx.search.tr.SearchTurkish',
+ }
+
+
+diff --git a/tests/run.py b/tests/run.py
+index 432e231..6d22e9d 100755
+--- a/tests/run.py
++++ b/tests/run.py
+@@ -23,7 +23,7 @@ sys.path.insert(0, os.path.abspath(os.path.join(testroot, os.path.pardir)))
+ # check dependencies before testing
+ print('Checking dependencies...')
+ for modname in ('nose', 'mock', 'six', 'docutils', 'jinja2', 'pygments',
+- 'snowballstemmer', 'babel'):
++ 'babel'):
+ try:
+ __import__(modname)
+ except ImportError as err:
diff --cc debian/patches/reproducible_grammar.diff
index 80f3016,0000000..673b485
mode 100644,000000..100644
--- a/debian/patches/reproducible_grammar.diff
+++ b/debian/patches/reproducible_grammar.diff
@@@ -1,70 -1,0 +1,70 @@@
- From 9490c2555e33c85dff9313d8287829a8f8bb286f Mon Sep 17 00:00:00 2001
++From eee30bfce40326a65f6ca2993a36bbf83ad9866f Mon Sep 17 00:00:00 2001
+From: Val Lorentz <progval at progval.net>
+Date: Thu, 8 Oct 2015 13:58:13 -0700
+Subject: make grammar generation deterministic
+
+Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
+Last-Update: 2015-09-03
+
+Patch-Name: reproducible_grammar.diff
+---
+ sphinx/pycode/pgen2/pgen.py | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/sphinx/pycode/pgen2/pgen.py b/sphinx/pycode/pgen2/pgen.py
+index e199ed8..85a1bcc 100644
+--- a/sphinx/pycode/pgen2/pgen.py
++++ b/sphinx/pycode/pgen2/pgen.py
+@@ -4,6 +4,10 @@
+ from __future__ import print_function
+
+ from six import iteritems
++try:
++ from collections import OrderedDict
++except ImportError: # Fallback for Python 2.6
++ OrderedDict = dict
+
+ # Pgen imports
+
+@@ -57,7 +61,7 @@ class ParserGenerator(object):
+ def make_first(self, c, name):
+ rawfirst = self.first[name]
+ first = {}
+- for label in rawfirst:
++ for label in sorted(rawfirst):
+ ilabel = self.make_label(c, label)
+ ##assert ilabel not in first # X X X failed on <> ... !=
+ first[ilabel] = 1
+@@ -138,8 +142,8 @@ class ParserGenerator(object):
+ totalset[label] = 1
+ overlapcheck[label] = {label: 1}
+ inverse = {}
+- for label, itsfirst in iteritems(overlapcheck):
+- for symbol in itsfirst:
++ for label, itsfirst in sorted(overlapcheck.items()):
++ for symbol in sorted(itsfirst):
+ if symbol in inverse:
+ raise ValueError("rule %s is ambiguous; %s is in the"
+ " first sets of %s as well as %s" %
+@@ -349,6 +353,9 @@ class NFAState(object):
+ assert isinstance(next, NFAState)
+ self.arcs.append((label, next))
+
++ def __hash__(self):
++ return hash(tuple(x[0] for x in self.arcs))
++
+ class DFAState(object):
+
+ def __init__(self, nfaset, final):
+@@ -357,7 +364,10 @@ class DFAState(object):
+ assert isinstance(final, NFAState)
+ self.nfaset = nfaset
+ self.isfinal = final in nfaset
+- self.arcs = {} # map from label to DFAState
++ self.arcs = OrderedDict() # map from label to DFAState
++
++ def __hash__(self):
++ return hash(tuple(self.arcs))
+
+ def addarc(self, next, label):
+ assert isinstance(label, str)
diff --cc debian/patches/reproducible_inventory.diff
index 0efe5b3,0000000..296e6ab
mode 100644,000000..100644
--- a/debian/patches/reproducible_inventory.diff
+++ b/debian/patches/reproducible_inventory.diff
@@@ -1,26 -1,0 +1,26 @@@
- From 2362dbfc62ce1079e78e1708df89e9d238f3ccac Mon Sep 17 00:00:00 2001
++From 8b216065ba15c5838303b77884b8c631cd7a5577 Mon Sep 17 00:00:00 2001
+From: Val Lorentz <progval at progval.net>
+Date: Thu, 8 Oct 2015 13:58:14 -0700
+Subject: make inventory generation deterministic
+
+Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
+Last-Update: 2015-08-20
+
+Patch-Name: reproducible_inventory.diff
+---
+ sphinx/builders/html.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
+index 7006eff..d4487fc 100644
+--- a/sphinx/builders/html.py
++++ b/sphinx/builders/html.py
+@@ -830,7 +830,7 @@ class StandaloneHTMLBuilder(Builder):
+ u'# The remainder of this file is compressed using zlib.\n'
+ % (self.config.project, self.config.version)).encode('utf-8'))
+ compressor = zlib.compressobj(9)
+- for domainname, domain in iteritems(self.env.domains):
++ for domainname, domain in sorted(self.env.domains.items()):
+ for name, dispname, type, docname, anchor, prio in \
+ sorted(domain.get_objects()):
+ if anchor.endswith(name):
diff --cc debian/patches/reproducible_js_locale.diff
index b81ec1e,0000000..5cd2d24
mode 100644,000000..100644
--- a/debian/patches/reproducible_js_locale.diff
+++ b/debian/patches/reproducible_js_locale.diff
@@@ -1,26 -1,0 +1,26 @@@
- From a991d42676c88a6e7e3b0597e354c1a3a76cb7db Mon Sep 17 00:00:00 2001
++From 056354c0be26cfd7f41d4200764b5480588a6569 Mon Sep 17 00:00:00 2001
+From: Val Lorentz <progval at progval.net>
+Date: Thu, 8 Oct 2015 13:58:15 -0700
+Subject: make JavaScript locale generation deterministic
+
+Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
+Last-Update: 2015-08-20
+
+Patch-Name: reproducible_js_locale.diff
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
- index d0d4bb6..bd8ac93 100644
++index e656779..6d48bc1 100644
+--- a/setup.py
++++ b/setup.py
+@@ -162,7 +162,7 @@ else:
+ messages=jscatalog,
+ plural_expr=catalog.plural_expr,
+ locale=str(catalog.locale)
+- ), outfile)
++ ), outfile, sort_keys=True)
+ outfile.write(');')
+ finally:
+ outfile.close()
diff --cc debian/patches/reproducible_searchindex.diff
index c2698a3,0000000..3a8601e
mode 100644,000000..100644
--- a/debian/patches/reproducible_searchindex.diff
+++ b/debian/patches/reproducible_searchindex.diff
@@@ -1,29 -1,0 +1,29 @@@
- From 34b8575ce2dce459aa29179c9ea4f45351ddc8c8 Mon Sep 17 00:00:00 2001
++From 042799fd684c6095a6dc57db17a99edd4201212a Mon Sep 17 00:00:00 2001
+From: Val Lorentz <progval at progval.net>
+Date: Thu, 8 Oct 2015 13:58:16 -0700
+Subject: make searchindex generation deterministic
+
+Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
+Last-Update: 2015-09-03
+
+Patch-Name: reproducible_searchindex.diff
+---
+ sphinx/search/__init__.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py
+index d83d1f6..ba25497 100644
+--- a/sphinx/search/__init__.py
++++ b/sphinx/search/__init__.py
+@@ -261,9 +261,9 @@ class IndexBuilder(object):
+ rv = {}
+ otypes = self._objtypes
+ onames = self._objnames
+- for domainname, domain in iteritems(self.env.domains):
++ for domainname, domain in sorted(iteritems(self.env.domains)):
+ for fullname, dispname, type, docname, anchor, prio in \
+- domain.get_objects():
++ sorted(domain.get_objects()):
+ # XXX use dispname?
+ if docname not in fn2index:
+ continue
diff --cc debian/patches/source_date_epoch.diff
index 3ca7995,0000000..afced22
mode 100644,000000..100644
--- a/debian/patches/source_date_epoch.diff
+++ b/debian/patches/source_date_epoch.diff
@@@ -1,44 -1,0 +1,44 @@@
- From bc3fb77d1916c23ed758be45b0c212100845fcf4 Mon Sep 17 00:00:00 2001
++From 2d53b60670487e587a74f8280e97efdb23166947 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57 at gmail.com>
+Date: Thu, 8 Oct 2015 13:58:08 -0700
+Subject: add support for $SOURCE_DATE_EPOCH env variable
+
+Origin: upstream, https://github.com/sphinx-doc/sphinx/commit/71bac48e03d07f61
+Last-Update: 2015-07-25
+
+Patch-Name: source_date_epoch.diff
+---
+ sphinx/util/osutil.py | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
+index b4488b5..a56da44 100644
+--- a/sphinx/util/osutil.py
++++ b/sphinx/util/osutil.py
+@@ -151,15 +151,22 @@ no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
+ def make_filename(string):
+ return no_fn_re.sub('', string) or 'sphinx'
+
+-if PY2:
++
++def ustrftime(format, *args):
+ # strftime for unicode strings
+- def ustrftime(format, *args):
++ if not args:
++ # If time is not specified, try to use $SOURCE_DATE_EPOCH variable
++ # See https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
++ source_date_epoch = os.getenv('SOURCE_DATE_EPOCH')
++ if source_date_epoch is not None:
++ time_struct = time.gmtime(float(source_date_epoch))
++ args = [time_struct]
++ if PY2:
+ # if a locale is set, the time strings are encoded in the encoding
+ # given by LC_TIME; if that is available, use it
+ enc = locale.getlocale(locale.LC_TIME)[1] or 'utf-8'
+ return time.strftime(text_type(format).encode(enc), *args).decode(enc)
+-else: # Py3
+- def ustrftime(format, *args):
++ else: # Py3
+ # On Windows, time.strftime() and Unicode characters will raise UnicodeEncodeError.
+ # http://bugs.python.org/issue8304
+ try:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx.git
More information about the Python-modules-commits
mailing list