mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
7133577405
The better way to fix this would be to backport the upstream sphinx
patch:
faedcc48cc
Unfortunately it doesn't apply cleanly and isn't worth the effort
of backporting. Let's hope we can switch to python3 sage and the recent
sphinx version that comes with it before this becomes a problem.
25 lines
967 B
Diff
25 lines
967 B
Diff
diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
|
|
index 4849c2bffa..76b7bc8602 100644
|
|
--- a/src/sage/misc/sphinxify.py
|
|
+++ b/src/sage/misc/sphinxify.py
|
|
@@ -25,6 +25,7 @@ from __future__ import absolute_import, print_function
|
|
import os
|
|
import re
|
|
import shutil
|
|
+import warnings
|
|
from tempfile import mkdtemp
|
|
from sphinx.application import Sphinx
|
|
|
|
@@ -120,7 +121,10 @@ smart_quotes = no""")
|
|
# buildername, confoverrides, status, warning, freshenv).
|
|
sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format,
|
|
confoverrides, None, None, True)
|
|
- sphinx_app.build(None, [rst_name])
|
|
+ with warnings.catch_warnings():
|
|
+ # Quick and dirty workaround for https://trac.sagemath.org/ticket/28856#comment:19
|
|
+ warnings.simplefilter("ignore")
|
|
+ sphinx_app.build(None, [rst_name])
|
|
sys.path = old_sys_path
|
|
|
|
# We need to remove "_" from __builtin__ that the gettext module installs
|