nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-1.7.patch
2018-06-30 01:21:31 +02:00

63 lines
3.2 KiB
Diff

diff --git a/src/bin/sage b/src/bin/sage
index 397f30cbed..3fc473c343 100755
--- a/src/bin/sage
+++ b/src/bin/sage
@@ -980,8 +980,11 @@ if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
fi
if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
+ # Redirect stdin from /dev/null. This helps with running TeX which
+ # tends to ask interactive questions if something goes wrong. These
+ # cause the build to hang. If stdin is /dev/null, TeX just aborts.
shift
- exec sage-python23 -m "sage_setup.docbuild" "$@"
+ exec sage-python23 -m sage_setup.docbuild "$@" </dev/null
fi
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py
index 25f94f7b7d..3f07474d9b 100644
--- a/src/doc/common/conf.py
+++ b/src/doc/common/conf.py
@@ -627,7 +627,7 @@ def call_intersphinx(app, env, node, contnode):
sage: for line in open(thematic_index).readlines():
....: if "padics" in line:
....: sys.stdout.write(line)
- <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage Reference Manual: p-Adics ...)"><span>Introduction to the -adics</span></a></li>
+ <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage Reference Manual: p-Adics v...)"><span>Introduction to the -adics</span></a></li>
"""
debug_inf(app, "???? Trying intersphinx for %s"%node['reftarget'])
builder = app.builder
diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
index 4f76d4113a..8f426b5989 100644
--- a/src/sage/misc/sphinxify.py
+++ b/src/sage/misc/sphinxify.py
@@ -47,11 +47,11 @@ def sphinxify(docstring, format='html'):
sage: from sage.misc.sphinxify import sphinxify
sage: sphinxify('A test')
- '...<div class="docstring">\n \n <p>A test</p>\n\n\n</div>'
+ '<div class="docstring">\n \n <p>A test</p>\n\n\n</div>'
sage: sphinxify('**Testing**\n`monospace`')
- '...<div class="docstring"...<strong>Testing</strong>\n<span class="math"...</p>\n\n\n</div>'
+ '<div class="docstring"...<strong>Testing</strong>\n<span class="math...</p>\n\n\n</div>'
sage: sphinxify('`x=y`')
- '...<div class="docstring">\n \n <p><span class="math">x=y</span></p>\n\n\n</div>'
+ '<div class="docstring">\n \n <p><span class="math notranslate nohighlight">x=y</span></p>\n\n\n</div>'
sage: sphinxify('`x=y`', format='text')
'x=y\n'
sage: sphinxify(':math:`x=y`', format='text')
diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
index fda76a4174..d3413239dd 100644
--- a/src/sage_setup/docbuild/sphinxbuild.py
+++ b/src/sage_setup/docbuild/sphinxbuild.py
@@ -207,7 +207,7 @@ def runsphinx():
try:
sys.stdout = SageSphinxLogger(sys.stdout, os.path.basename(output_dir))
sys.stderr = SageSphinxLogger(sys.stderr, os.path.basename(output_dir))
- sphinx.cmdline.main(sys.argv)
+ sphinx.cmdline.main(sys.argv[1:])
finally:
sys.stdout = saved_stdout
sys.stderr = saved_stderr