[sagemath] 01/01: Add upstream patch for Sphinx 1.6.

Tobias Hansen thansen at moszumanska.debian.org
Mon Sep 18 00:32:39 UTC 2017


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

thansen pushed a commit to branch master
in repository sagemath.

commit d034784335665a0832aa612e5982b47e56ad5897
Author: Tobias Hansen <thansen at debian.org>
Date:   Mon Sep 18 01:17:44 2017 +0100

    Add upstream patch for Sphinx 1.6.
---
 debian/changelog                                   |   5 +
 debian/control.runtime-depends                     |   4 +-
 debian/patches/d1-sage-env.patch                   |   2 +-
 .../patches/df-disable-custom-sphinx-logger.patch  |   2 +-
 debian/patches/dt-disable-parallel-sphinx.patch    |   2 +-
 .../patches/dt-work-around-doc-common-conf.patch   |   4 +-
 debian/patches/series                              |   1 +
 debian/patches/u0-version-sphinx-1.6.patch         | 186 +++++++++++++++++++++
 debian/patches/u1-more-sphinx-1.5-fixes.patch      |   2 +-
 9 files changed, 199 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4555884..3e82770 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,13 @@
 sagemath (8.0-8) UNRELEASED; urgency=medium
 
+  [ Ximin Luo ]
   * Set a higher test timeout for slower architectures.
   * Don't ignore timed-out tests on i386, they work fine.
 
+  [ Tobias Hansen ]
+  * Add upstream patch to build with Sphinx (>= 1.6):
+    - u0-version-sphinx-1.6.patch (Closes: #872259)
+
  -- Ximin Luo <infinity0 at debian.org>  Mon, 11 Sep 2017 12:21:02 +0200
 
 sagemath (8.0-7) unstable; urgency=medium
diff --git a/debian/control.runtime-depends b/debian/control.runtime-depends
index 91ff03a..1d33532 100644
--- a/debian/control.runtime-depends
+++ b/debian/control.runtime-depends
@@ -88,9 +88,7 @@
  python-simplegeneric,
  python-singledispatch,
  python-snowballstemmer,
- python-sphinx (>= 1.5.3),
-# TODO: rm after #872259 is fixed
- python-sphinx (<< 1.6~),
+ python-sphinx (>= 1.6),
  python-sympy,
  python-terminado,
  python-tk,
diff --git a/debian/patches/d1-sage-env.patch b/debian/patches/d1-sage-env.patch
index 25b0164..f30c258 100644
--- a/debian/patches/d1-sage-env.patch
+++ b/debian/patches/d1-sage-env.patch
@@ -182,7 +182,7 @@ Author: Tobias Hansen <thansen at debian.org>, Ximin Luo <infinity0 at debian.org>
  
 --- a/sage/src/sage_setup/docbuild/__init__.py
 +++ b/sage/src/sage_setup/docbuild/__init__.py
-@@ -403,7 +403,7 @@
+@@ -396,7 +396,7 @@
              document_name = document.split('/')[1]
  
              # the sage directory within a subdocument, for example
diff --git a/debian/patches/df-disable-custom-sphinx-logger.patch b/debian/patches/df-disable-custom-sphinx-logger.patch
index cd33277..863d5a0 100644
--- a/debian/patches/df-disable-custom-sphinx-logger.patch
+++ b/debian/patches/df-disable-custom-sphinx-logger.patch
@@ -5,7 +5,7 @@ Forwarded: not-needed
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/sage/src/sage_setup/docbuild/sphinxbuild.py
 +++ b/sage/src/sage_setup/docbuild/sphinxbuild.py
-@@ -202,8 +202,9 @@
+@@ -205,8 +205,9 @@
      saved_stderr = sys.stderr
  
      try:
diff --git a/debian/patches/dt-disable-parallel-sphinx.patch b/debian/patches/dt-disable-parallel-sphinx.patch
index a99d906..1c6aace 100644
--- a/debian/patches/dt-disable-parallel-sphinx.patch
+++ b/debian/patches/dt-disable-parallel-sphinx.patch
@@ -9,7 +9,7 @@ Forwarded: not-needed
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/sage/src/sage_setup/docbuild/__init__.py
 +++ b/sage/src/sage_setup/docbuild/__init__.py
-@@ -241,7 +241,7 @@
+@@ -234,7 +234,7 @@
      inventory = builder_helper('inventory')
  
  
diff --git a/debian/patches/dt-work-around-doc-common-conf.patch b/debian/patches/dt-work-around-doc-common-conf.patch
index ff864d9..26b4665 100644
--- a/debian/patches/dt-work-around-doc-common-conf.patch
+++ b/debian/patches/dt-work-around-doc-common-conf.patch
@@ -46,8 +46,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 +    if not os.path.exists(confdir):
 +        confdir = os.path.join(SAGE_LIB, 'sage', 'misc', 'docs', 'introspect')
  
-     doctreedir = os.path.join(srcdir, 'doctrees')
-     confoverrides = {'html_context': {}, 'master_doc': 'docstring'}
+     open(os.path.join(srcdir, 'docutils.conf'), 'w').write(r"""
+ [parsers]
 --- a/sage/src/doc/en/introspect/conf.py
 +++ b/sage/src/doc/en/introspect/conf.py
 @@ -3,8 +3,11 @@
diff --git a/debian/patches/series b/debian/patches/series
index 5986195..01f06d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
 # Or nearly-finished patches that they'll very probably merge.
 u0-version-cython-0.26.patch               #23360
 u0-version-scipy-0.19.1.patch              #23594
+u0-version-sphinx-1.6.patch                #23023
 
 # Patches that have open upstream tickets
 u1-version-pbori-boost1.62-hashes.patch    #22243
diff --git a/debian/patches/u0-version-sphinx-1.6.patch b/debian/patches/u0-version-sphinx-1.6.patch
new file mode 100644
index 0000000..dc206af
--- /dev/null
+++ b/debian/patches/u0-version-sphinx-1.6.patch
@@ -0,0 +1,186 @@
+Bug: https://trac.sagemath.org/ticket/23023
+
+From 2ea32c168574623501bcd031253e8e322afa9a8c Mon Sep 17 00:00:00 2001
+From: Jeroen Demeyer <jdemeyer at cage.ugent.be>
+Date: Thu, 18 May 2017 13:43:16 +0200
+Subject: Upgrade to Sphinx 1.6.3
+
+---
+ build/pkgs/sphinx/checksums.ini             |  6 +--
+ build/pkgs/sphinx/package-version.txt       |  2 +-
+ build/pkgs/sphinx/patches/environment.patch | 15 ++++---
+ build/pkgs/sphinx/patches/ssl.patch         | 62 -----------------------------
+ build/pkgs/typing/SPKG.txt                  | 17 ++++++++
+ build/pkgs/typing/checksums.ini             |  4 ++
+ build/pkgs/typing/dependencies              |  5 +++
+ build/pkgs/typing/package-version.txt       |  1 +
+ build/pkgs/typing/spkg-install              |  9 +++++
+ build/pkgs/typing/type                      |  1 +
+ src/sage_setup/docbuild/__init__.py         | 12 +++---
+ src/sage_setup/docbuild/ext/multidocs.py    | 10 +++--
+ src/sage_setup/docbuild/sphinxbuild.py      |  2 +
+ 13 files changed, 63 insertions(+), 83 deletions(-)
+ delete mode 100644 build/pkgs/sphinx/patches/ssl.patch
+ create mode 100644 build/pkgs/typing/SPKG.txt
+ create mode 100644 build/pkgs/typing/checksums.ini
+ create mode 100644 build/pkgs/typing/dependencies
+ create mode 100644 build/pkgs/typing/package-version.txt
+ create mode 100755 build/pkgs/typing/spkg-install
+ create mode 100644 build/pkgs/typing/type
+
+From 6930d06663d7bbac51c840f163ba0874fbd2e9e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
+Date: Tue, 8 Aug 2017 14:35:22 +1200
+Subject: Remove language specific targeting as upstream has removed at least
+ the only one we are using.
+
+---
+ src/sage_setup/docbuild/__init__.py | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+From 56bffcc8508c9a0ed9c052d0fc4db5ae9e71e53c Mon Sep 17 00:00:00 2001
+From: "John H. Palmieri" <palmieri at math.washington.edu>
+Date: Thu, 10 Aug 2017 21:45:11 -0700
+Subject: trac 23023: - Create temporary docutils.conf to turn off smart quotes
+ during introspection. - Replace deprecated import of Directive. - Silence new
+ redundant "WARNING: Build finished" message.
+
+---
+ src/sage/misc/sphinxify.py                  | 4 ++++
+ src/sage_setup/docbuild/ext/sage_autodoc.py | 2 +-
+ src/sage_setup/docbuild/sphinxbuild.py      | 1 +
+ 3 files changed, 6 insertions(+), 1 deletion(-)
+
+From c48896722c5546fbdca8a58e6516828912d87f85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
+Date: Mon, 14 Aug 2017 11:37:40 +1200
+Subject: Add typing to DOC_DEPENDENCIES
+
+---
+ build/make/deps | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sage/src/sage_setup/docbuild/__init__.py
++++ b/sage/src/sage_setup/docbuild/__init__.py
+@@ -197,8 +197,7 @@
+         """
+         Builds the PDF files for this document.  This is done by first
+         (re)-building the LaTeX output, going into that LaTeX
+-        directory, and running 'make all-pdf' (or for the special case of
+-        the ja docs, 'all-pdf-ja(ex,to run platex)' there.
++        directory, and running 'make all-pdf' there.
+ 
+         EXAMPLES::
+ 
+@@ -211,13 +210,7 @@
+         pdf_dir = self._output_dir('pdf')
+         make_target = "cd '%s' && $MAKE %s && mv -f *.pdf '%s'"
+         error_message = "failed to run $MAKE %s in %s"
+-        MB_LANG = {'ja': 'all-pdf-ja'} # language name : the modified target
+-
+-        # Replace the command for languages that require special processing
+-        if self.lang in MB_LANG:
+-            command = MB_LANG[self.lang]
+-        else:
+-            command = 'all-pdf'
++        command = 'all-pdf'
+ 
+         if subprocess.call(make_target%(tex_dir, command, pdf_dir), shell=True):
+             raise RuntimeError(error_message%(command, tex_dir))
+@@ -770,14 +763,16 @@
+         Returns the Sphinx environment for this project.
+         """
+         from sphinx.environment import BuildEnvironment
+-        class Foo(object):
+-            pass
+-        config = Foo()
+-        config.values = []
++        class FakeConfig(object):
++            values = tuple()
++        class FakeApp(object):
++            def __init__(self, dir):
++                self.srcdir = dir
++                self.config = FakeConfig()
+ 
+         env_pickle = os.path.join(self._doctrees_dir(), 'environment.pickle')
+         try:
+-            env = BuildEnvironment.frompickle(self.dir, config, env_pickle)
++            env = BuildEnvironment.frompickle(env_pickle, FakeApp(self.dir))
+             logger.debug("Opened Sphinx environment: %s", env_pickle)
+             return env
+         except IOError as err:
+--- a/sage/src/sage_setup/docbuild/ext/multidocs.py
++++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
+@@ -86,9 +86,10 @@
+                 env.metadata[ind] = md
+             # merge the citations
+             newcite = {}
+-            for ind, (path, tag) in six.iteritems(docenv.domaindata["std"]["citations"]):
++            citations = docenv.domaindata["std"]["citations"]
++            for ind, (path, tag, lineno) in six.iteritems(docenv.domaindata["std"]["citations"]):
+                 # TODO: Warn on conflicts
+-                newcite[ind] = (fixpath(path), tag)
++                newcite[ind] = (fixpath(path), tag, lineno)
+             env.domaindata["std"]["citations"].update(newcite)
+             # merge the py:module indexes
+             newmodules = {}
+@@ -247,9 +248,10 @@
+         cache = cPickle.load(f)
+     app.builder.info("done (%s citations)."%len(cache))
+     cite = env.domaindata["std"]["citations"]
+-    for ind, (path, tag) in six.iteritems(cache):
++    for ind, (path, tag, lineno) in six.iteritems(cache):
+         if ind not in cite: # don't override local citation
+-            cite[ind]=(os.path.join("..", path), tag)
++            cite[ind] = (os.path.join("..", path), tag, lineno)
++
+ 
+ def init_subdoc(app):
+     """
+--- a/sage/src/sage_setup/docbuild/sphinxbuild.py
++++ b/sage/src/sage_setup/docbuild/sphinxbuild.py
+@@ -55,6 +55,9 @@
+             re.compile('WARNING: html_static_path entry .* does not exist'),
+             re.compile('WARNING: while setting up extension'),
+             re.compile('WARNING: Any IDs not assiend for figure node'),
++            re.compile('WARNING: .* is not referenced'),
++            re.compile('WARNING: Build finished'),
++            re.compile('language "hu" not supported'),
+             )
+ 
+         # replacements: pairs of regular expressions and their replacements,
+--- a/sage/src/sage/misc/sphinxify.py
++++ b/sage/src/sage/misc/sphinxify.py
+@@ -80,6 +80,10 @@
+     # buildername, confoverrides, status, warning, freshenv).
+     confdir = os.path.join(SAGE_DOC_SRC, 'en', 'introspect')
+ 
++    open(os.path.join(srcdir, 'docutils.conf'), 'w').write(r"""
++[parsers]
++smart_quotes = no
++""")
+     doctreedir = os.path.join(srcdir, 'doctrees')
+     confoverrides = {'html_context': {}, 'master_doc': 'docstring'}
+ 
+--- a/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
++++ b/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
+@@ -39,7 +39,7 @@
+ from sphinx.pycode import ModuleAnalyzer, PycodeError
+ from sphinx.application import ExtensionError
+ from sphinx.util.nodes import nested_parse_with_titles
+-from sphinx.util.compat import Directive
++from docutils.parsers.rst import Directive
+ from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \
+     safe_getattr, object_description, is_builtin_class_method
+ from sphinx.util.docstrings import prepare_docstring
+--- a/sage/build/make/deps
++++ b/sage/build/make/deps
+@@ -206,7 +206,7 @@
+ 	| $(SAGERUNTIME) $(inst_maxima) $(inst_networkx) $(inst_scipy) \
+ 	$(inst_matplotlib) $(inst_pillow) $(inst_mathjax) $(inst_mpmath) \
+ 	$(inst_ipykernel) $(inst_jupyter_client) $(inst_conway_polynomials) \
+-	$(inst_tachyon) $(inst_jmol) $(inst_thebe) $(inst_ipywidgets)
++	$(inst_tachyon) $(inst_jmol) $(inst_thebe) $(inst_ipywidgets) $(inst_typing)
+ 
+ doc: doc-html
+ 
diff --git a/debian/patches/u1-more-sphinx-1.5-fixes.patch b/debian/patches/u1-more-sphinx-1.5-fixes.patch
index ddaaee8..734dd67 100644
--- a/debian/patches/u1-more-sphinx-1.5-fixes.patch
+++ b/debian/patches/u1-more-sphinx-1.5-fixes.patch
@@ -8,7 +8,7 @@ Bug: https://trac.sagemath.org/ticket/23364
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/sage/src/sage_setup/docbuild/ext/multidocs.py
 +++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
-@@ -147,7 +147,7 @@
+@@ -148,7 +148,7 @@
              # merge the filenames
              filenames = app.builder.indexer._filenames
              for (res, filename) in six.iteritems(index._filenames):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list