[arch-commits] Commit in sagemath/trunk (PKGBUILD sagemath-sphinx-3.0.patch)
Antonio Rojas
arojas at archlinux.org
Sat Apr 18 20:53:36 UTC 2020
Date: Saturday, April 18, 2020 @ 20:53:35
Author: arojas
Revision: 616167
Fix doc build with sphinx 3
Added:
sagemath/trunk/sagemath-sphinx-3.0.patch
Modified:
sagemath/trunk/PKGBUILD
---------------------------+
PKGBUILD | 10 ++++--
sagemath-sphinx-3.0.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-04-18 20:19:50 UTC (rev 616166)
+++ PKGBUILD 2020-04-18 20:53:35 UTC (rev 616167)
@@ -8,7 +8,7 @@
pkgbase=sagemath
pkgname=(sagemath sagemath-jupyter)
pkgver=9.0
-pkgrel=15
+pkgrel=16
pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
arch=(x86_64)
url="http://www.sagemath.org"
@@ -45,7 +45,8 @@
sagemath-python-3.8.patch
sagemath-gap-4.11.patch
sagemath-matplotlib-3.2.patch
- sagemath-jedi-0.16.patch)
+ sagemath-jedi-0.16.patch
+ sagemath-sphinx-3.0.patch)
sha256sums=('6f5d42b306a2c03073dd95086f80602bd1a0b929b8ad19c6d219c8ca8e96da26'
'496da0fa42cdfc92b43f5d85610bb462ca9bdc2f4d80fd316e8e9d068dba3b0b'
'6a5470d7044a50a35a6478f57c19adf72fe54aefebeea8a095915b63f9e219ac'
@@ -58,7 +59,8 @@
'd430e76c5cdebed9bd1cde0f05e74fba620c736c68c018d70d84dc7b3e3c9049'
'7123af05c79f76b94c89aa97da13dd1c1a796cdf10a9486e0974c88054eb3037'
'979777363001cca87f73128dd4db5f372fc9e4f1079805a20af01df47797468f'
- '63914b14d8369cb37e88500c73029bea83025d437029af65ba523f5f4396af91')
+ '63914b14d8369cb37e88500c73029bea83025d437029af65ba523f5f4396af91'
+ 'ab7016e398d227fed39035028ad8585789aff1a8a8b467cb1176e4b1c6bc5946')
prepare(){
cd sage-$pkgver
@@ -92,6 +94,8 @@
patch -p1 -i ../sagemath-singular-4.1.2.patch
# Fix SIGFPE crashes with ecl 16.1.3 https://trac.sagemath.org/ticket/22191
patch -p1 -i ../sagemath-ecl-sigfpe.patch
+# Fix doc build with sphinx 3 https://trac.sagemath.org/ticket/28856
+ patch -p1 -i ../sagemath-sphinx-3.0.patch
sed -e 's|sage-python23|python|' -i src/bin/*
sed -e 's|$SAGE_PYTHON3|yes|' -i src/bin/sage
Added: sagemath-sphinx-3.0.patch
===================================================================
--- sagemath-sphinx-3.0.patch (rev 0)
+++ sagemath-sphinx-3.0.patch 2020-04-18 20:53:35 UTC (rev 616167)
@@ -0,0 +1,71 @@
+Index: sage/docs/conf.py
+===================================================================
+--- a/src/sage/docs/conf.py
++++ b/src/sage/docs/conf.py
+@@ -8,6 +8,7 @@ from docutils import nodes
+ from docutils.transforms import Transform
+ from sphinx.ext.doctest import blankline_re
+ from sphinx import highlighting
++import sphinx.ext.intersphinx as intersphinx
+ from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer
+
+ # If your extensions are in another directory, add it here.
+@@ -169,13 +169,8 @@ todo_include_todos = True
+
+ # Cross-links to other project's online documentation.
+ python_version = sys.version_info.major
+-intersphinx_mapping = {
+- 'python': ('https://docs.python.org/',
+- os.path.join(SAGE_DOC_SRC, "common",
+- "python{}.inv".format(python_version))),
+- 'pplpy': (PPLPY_DOCS, None)}
+
+-def set_intersphinx_mappings(app):
++def set_intersphinx_mappings(app, config):
+ """
+ Add precompiled inventory (the objects.inv)
+ """
+@@ -186,7 +182,11 @@ def set_intersphinx_mappings(app):
+ app.config.intersphinx_mapping = {}
+ return
+
+- app.config.intersphinx_mapping = intersphinx_mapping
++ app.config.intersphinx_mapping = {
++ 'python': ('https://docs.python.org/',
++ os.path.join(SAGE_DOC_SRC, "common",
++ "python{}.inv".format(python_version))),
++ 'pplpy': (PPLPY_DOCS, None)}
+
+ # Add master intersphinx mapping
+ dst = os.path.join(invpath, 'objects.inv')
+@@ -201,6 +201,7 @@ def set_intersphinx_mappings(app):
+ dst = os.path.join(invpath, directory, 'objects.inv')
+ app.config.intersphinx_mapping[src] = dst
+
++ intersphinx.normalize_intersphinx_mapping(app, config)
+
+ # By default document are not master.
+ multidocs_is_master = True
+@@ -669,7 +672,7 @@ def call_intersphinx(app, env, node, contnode):
+ """
+ debug_inf(app, "???? Trying intersphinx for %s" % node['reftarget'])
+ builder = app.builder
+- res = sphinx.ext.intersphinx.missing_reference(
++ res = intersphinx.missing_reference(
+ app, env, node, contnode)
+ if res:
+ # Replace absolute links to $SAGE_DOC by relative links: this
+@@ -852,11 +855,10 @@ def setup(app):
+ if app.srcdir.startswith(SAGE_DOC_SRC):
+ app.add_config_value('intersphinx_mapping', {}, False)
+ app.add_config_value('intersphinx_cache_limit', 5, False)
++ app.connect('config-inited', set_intersphinx_mappings)
++ app.connect('builder-inited', intersphinx.load_mappings)
+ # We do *not* fully initialize intersphinx since we call it by hand
+ # in find_sage_dangling_links.
+ # app.connect('missing-reference', missing_reference)
+ app.connect('missing-reference', find_sage_dangling_links)
+- import sphinx.ext.intersphinx
+- app.connect('builder-inited', set_intersphinx_mappings)
+- app.connect('builder-inited', sphinx.ext.intersphinx.load_mappings)
+ app.connect('builder-inited', nitpick_patch_config)
More information about the arch-commits
mailing list