[Python-modules-commits] [sphinx] 12/13: merge patched into master

Dmitry Shachnev mitya57 at moszumanska.debian.org
Mon Nov 30 15:35:38 UTC 2015


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

mitya57 pushed a commit to branch master
in repository sphinx.

commit 00043a2cb8c45d7100b8578fc75c5e10f4c5b39e
Merge: f4a05d1 515524e
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Mon Nov 30 18:30:27 2015 +0300

    merge patched into master

 CHANGES                                            |  78 +++
 PKG-INFO                                           |   2 +-
 Sphinx.egg-info/PKG-INFO                           |   2 +-
 Sphinx.egg-info/SOURCES.txt                        |  17 +
 Sphinx.egg-info/requires.txt                       |   4 +-
 debian/.git-dpm                                    |   6 +-
 debian/patches/addto_only_babel.diff               |  32 --
 debian/patches/compat_css.diff                     |  21 -
 debian/patches/disable_distribute_setup.diff       |   4 +-
 debian/patches/disable_js_version_check.diff       |   4 +-
 debian/patches/no_external_css.diff                |   2 +-
 debian/patches/no_snowballstemmer.diff             |  18 +-
 debian/patches/no_theme_rename_warning.diff        |  36 --
 debian/patches/print_help.diff                     |  38 --
 debian/patches/py35compat.diff                     |  40 --
 debian/patches/reproducible_grammar.diff           |   2 +-
 debian/patches/reproducible_inventory.diff         |   6 +-
 debian/patches/reproducible_js_locale.diff         |   4 +-
 debian/patches/reproducible_searchindex.diff       |   6 +-
 debian/patches/series                              |   5 -
 debian/patches/source_date_epoch.diff              |  25 +-
 doc/_templates/indexsidebar.html                   |   2 +-
 doc/builders.rst                                   |  38 ++
 doc/config.rst                                     |   2 +-
 doc/ext/graphviz.rst                               |   4 +
 doc/ext/ifconfig.rst                               |   4 +-
 doc/ext/todo.rst                                   |   4 +
 doc/extdev/tutorial.rst                            |   4 +-
 doc/install.rst                                    |   2 +-
 doc/make.bat                                       |  33 ++
 setup.py                                           |   4 +-
 sphinx/__init__.py                                 |   6 +-
 sphinx/apidoc.py                                   |   7 +-
 sphinx/application.py                              |  19 +-
 sphinx/builders/__init__.py                        |   9 +-
 sphinx/builders/html.py                            |   8 +-
 sphinx/builders/latex.py                           |  13 +-
 sphinx/builders/linkcheck.py                       |  15 +-
 sphinx/builders/manpage.py                         |   2 +-
 sphinx/builders/texinfo.py                         |   2 +-
 sphinx/builders/websupport.py                      |   2 +
 sphinx/directives/code.py                          |   9 -
 sphinx/directives/other.py                         |   9 +-
 sphinx/domains/std.py                              |   2 +-
 sphinx/environment.py                              |  12 +-
 sphinx/ext/autosummary/__init__.py                 |   2 +-
 sphinx/ext/coverage.py                             |   6 +-
 sphinx/ext/doctest.py                              |  60 +-
 sphinx/ext/intersphinx.py                          |   1 +
 sphinx/ext/napoleon/docstring.py                   | 114 ++--
 sphinx/ext/todo.py                                 |   9 +-
 sphinx/highlighting.py                             |  12 +-
 sphinx/locale/__init__.py                          |   5 +-
 sphinx/pycode/__init__.py                          |  17 +-
 sphinx/quickstart.py                               |   8 +-
 sphinx/search/__init__.py                          |  10 +
 sphinx/search/da.py                                |   1 +
 sphinx/search/de.py                                |   1 +
 sphinx/search/es.py                                |   1 +
 sphinx/search/fi.py                                |   1 +
 sphinx/search/fr.py                                |   1 +
 sphinx/search/hu.py                                |   1 +
 sphinx/search/it.py                                |   1 +
 sphinx/search/ja.py                                |   9 +-
 sphinx/search/nl.py                                |   1 +
 sphinx/search/no.py                                |   1 +
 sphinx/search/pt.py                                |   1 +
 sphinx/search/ro.py                                |   1 +
 sphinx/search/ru.py                                |   1 +
 sphinx/search/sv.py                                |   1 +
 sphinx/search/tr.py                                |   1 +
 sphinx/themes/basic/static/searchtools.js_t        |  46 +-
 sphinx/theming.py                                  |  44 +-
 sphinx/transforms.py                               |  22 +-
 sphinx/util/docfields.py                           |   7 +-
 sphinx/util/i18n.py                                |  11 +-
 sphinx/util/nodes.py                               |  73 ++-
 sphinx/util/osutil.py                              |  10 +-
 sphinx/websupport/search/__init__.py               |   4 +
 sphinx/writers/html.py                             |   5 +-
 sphinx/writers/latex.py                            |  96 +++-
 sphinx/writers/text.py                             |  14 +-
 tests/root/footnote.txt                            |  15 +
 tests/root/markup.txt                              |   8 +-
 tests/roots/test-build-text/listitems.txt          |   4 +
 tests/roots/test-contentsname/bar.rst              |   4 +
 tests/roots/test-contentsname/conf.py              |   4 +
 tests/roots/test-contentsname/foo.rst              |   4 +
 tests/roots/test-contentsname/index.rst            |   8 +
 tests/roots/test-directive-code/empty.inc          |   3 +
 tests/roots/test-directive-code/lineno_match.rst   |   3 +
 tests/roots/test-directive-code/literal.inc        |   1 +
 tests/roots/test-doctest/doctest.txt               |   9 +
 .../base_themes_dir/base_theme1/theme.conf         |   2 +
 .../base_themes_dir/base_theme2/theme.conf         |   2 +
 tests/roots/test-double-inheriting-theme/conf.py   |   7 +
 tests/roots/test-double-inheriting-theme/index.rst |   3 +
 tests/roots/test-ext-graphviz/conf.py              |   4 +
 tests/roots/test-ext-graphviz/index.rst            |   7 +
 tests/roots/test-intl/contents.txt                 |   1 +
 tests/roots/test-intl/definition_terms.po          |  10 +
 tests/roots/test-intl/definition_terms.txt         |   3 +
 tests/roots/test-intl/refs.po                      |  85 +++
 tests/roots/test-intl/refs.txt                     |  47 ++
 tests/test_build_html.py                           |   8 +-
 tests/test_build_latex.py                          |  43 ++
 tests/test_build_text.py                           |  12 +
 tests/test_directive_code.py                       |  34 +-
 tests/test_ext_graphviz.py                         |  23 +
 tests/test_ext_napoleon_docstring.py               | 635 ++++++++++++++++++++-
 tests/test_intl.py                                 |  23 +-
 tests/test_markup.py                               |   2 +-
 tests/test_theming.py                              |  18 +-
 tests/test_util_i18n.py                            |   8 +-
 tests/test_util_nodes.py                           |  36 +-
 115 files changed, 1759 insertions(+), 480 deletions(-)

diff --cc debian/.git-dpm
index 5ba3911,0000000..8b72ddc
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
- de311d23793a9402775ef75b1d19168ef76ecfe8
- de311d23793a9402775ef75b1d19168ef76ecfe8
- 3431307c0086dfebba1717279a153a3e221bb909
++515524e3e9135ddf35191c646437ef65df99b745
++515524e3e9135ddf35191c646437ef65df99b745
++ded891849d330349aeb9f9f1ae21ab9f54460338
 +ded891849d330349aeb9f9f1ae21ab9f54460338
 +sphinx_1.3.2.orig.tar.gz
 +5730a60d201b2244ca9515493801b599ec4d219b
 +3480453
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/disable_distribute_setup.diff
index 0fdaa2a,0000000..97281ec
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 5dab889fb4835ed02f552fd8cc73cc94aa7bde10 Mon Sep 17 00:00:00 2001
++From 4da2ea430f6b1804bc7884be834e4638e30b02a7 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 2978915..8178833 100644
++index 6bc2887..d44e8a9 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 3e31ebd,0000000..a08f28d
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 f63173f9bd6290f3e025881d62a6eeb4067396f3 Mon Sep 17 00:00:00 2001
++From 6d00b53139d12656d6ff38f8a1791edb9f3e9957 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 45229c8..ed50b33 100644
++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 0a1ecea,0000000..d46ba0b
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 d6fb87953db01edf40b017680f871f2acce65ddc Mon Sep 17 00:00:00 2001
++From ce1dff8cf21413e31a5fa287468a49947e940759 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 c66b28b,0000000..d6abd21
mode 100644,000000..100644
--- a/debian/patches/no_snowballstemmer.diff
+++ b/debian/patches/no_snowballstemmer.diff
@@@ -1,80 -1,0 +1,80 @@@
- From 7a66f3f3c1d4bf40dab3e9e76c2337ffb9e88b5b Mon Sep 17 00:00:00 2001
++From c757399c3f8fb33b6a791ce50f91799cc7c302b2 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 eb8535b..256e362 100644
++index 5100b88..db64611 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
++ babel>=1.3,!=2.0
 + alabaster>=0.7,<0.8
-  sphinx_rtd_theme>=0.1,<0.2
++ sphinx_rtd_theme>=0.1,<2.0
 +diff --git a/setup.py b/setup.py
- index 8178833..c67667b 100644
++index d44e8a9..d0d4bb6 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',
++     'babel>=1.3,!=2.0',
 +     'alabaster>=0.7,<0.8',
-      'sphinx_rtd_theme>=0.1,<0.2',
++     'sphinx_rtd_theme>=0.1,<2.0',
 +diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py
- index 8126c9a..faa7b24 100644
++index e248088..d83d1f6 100644
 +--- a/sphinx/search/__init__.py
 ++++ b/sphinx/search/__init__.py
- @@ -117,22 +117,8 @@ def parse_stop_word(source):
++@@ -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 af7baa9,0000000..f1b7918
mode 100644,000000..100644
--- a/debian/patches/reproducible_grammar.diff
+++ b/debian/patches/reproducible_grammar.diff
@@@ -1,70 -1,0 +1,70 @@@
- From f9aa89125dc31fbd8e2e21886dd1a28b5a9d633c Mon Sep 17 00:00:00 2001
++From 148e2a3cb0920a63958211053818b682328c5054 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 19cbb58,0000000..f0b14d1
mode 100644,000000..100644
--- a/debian/patches/reproducible_inventory.diff
+++ b/debian/patches/reproducible_inventory.diff
@@@ -1,26 -1,0 +1,26 @@@
- From 6cf6aacf5e6e78f7af32854b50c8fffc1a0bd4c5 Mon Sep 17 00:00:00 2001
++From b694ca253577e3f29b8d42530ab1d58aafb8c0ca 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 431ac40..3b33a01 100644
++index 7006eff..d4487fc 100644
 +--- a/sphinx/builders/html.py
 ++++ b/sphinx/builders/html.py
- @@ -824,7 +824,7 @@ class StandaloneHTMLBuilder(Builder):
++@@ -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 f9aa9f0,0000000..ca7905a
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 7b21e43db64902e67606b730636f694d87e211ba Mon Sep 17 00:00:00 2001
++From d6270fd53db3b1d411a9b4c0d0ae8f61c0532e6e 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 c67667b..62a07bb 100644
++index d0d4bb6..bd8ac93 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 a6a9f0f,0000000..d668d4a
mode 100644,000000..100644
--- a/debian/patches/reproducible_searchindex.diff
+++ b/debian/patches/reproducible_searchindex.diff
@@@ -1,29 -1,0 +1,29 @@@
- From de311d23793a9402775ef75b1d19168ef76ecfe8 Mon Sep 17 00:00:00 2001
++From 515524e3e9135ddf35191c646437ef65df99b745 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 faa7b24..803c740 100644
++index d83d1f6..ba25497 100644
 +--- a/sphinx/search/__init__.py
 ++++ b/sphinx/search/__init__.py
- @@ -259,9 +259,9 @@ class IndexBuilder(object):
++@@ -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/series
index 1592061,0000000..7284bf6
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,14 -1,0 +1,9 @@@
 +disable_distribute_setup.diff
 +no_external_css.diff
 +disable_js_version_check.diff
 +no_snowballstemmer.diff
- py35compat.diff
- no_theme_rename_warning.diff
 +source_date_epoch.diff
- addto_only_babel.diff
- print_help.diff
- compat_css.diff
 +reproducible_grammar.diff
 +reproducible_inventory.diff
 +reproducible_js_locale.diff
 +reproducible_searchindex.diff
diff --cc debian/patches/source_date_epoch.diff
index 2df5a5c,0000000..7a87c34
mode 100644,000000..100644
--- a/debian/patches/source_date_epoch.diff
+++ b/debian/patches/source_date_epoch.diff
@@@ -1,45 -1,0 +1,44 @@@
- From 1de4c3462e04fad3ca3d2fadb1ffa86f16841933 Mon Sep 17 00:00:00 2001
- From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
++From 0e2eb0485f4b8c743732e4803d8e36aacfe3032b 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 | 16 ++++++++++++----
-  1 file changed, 12 insertions(+), 4 deletions(-)
++ 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 20c6a90..5bfbcab 100644
++index b4488b5..a56da44 100644
 +--- a/sphinx/util/osutil.py
 ++++ b/sphinx/util/osutil.py
- @@ -151,15 +151,23 @@ no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
++@@ -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:
- -    ustrftime = time.strftime
- +    else:
- +        return time.strftime(format, *args)
-  
-  
-  def safe_relpath(path, start=None):
++-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