sagemath/sagemath-sagedoc.patch
Jerry James 861d3bcc88 Version 9.2 (bz 1891244)
- Unbundle widgetsnbextension (bz 1856311)
- Unbundle mathjax fonts (bz 1875606)
- Do not require the -doc subpackage from the main package (bz 1867123)
- Drop upstreamed patches: -ecl, -fes, -includes, -sagetex, -sigfpe, -sympy
2020-11-11 16:28:59 -07:00

88 lines
4.1 KiB
Diff

diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
--- src/sage/doctest/control.py.orig 2020-10-24 11:37:59.000000000 -0600
+++ src/sage/doctest/control.py 2020-10-30 13:55:37.330649309 -0600
@@ -115,7 +115,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False
self.massif = False
self.cachegrind = False
- self.omega = False
self.failed = False
self.new = False
self.show_skipped = False
@@ -318,7 +317,7 @@ class DocTestController(SageObject):
if options.gdb or options.debug:
# Interactive debuggers: "infinite" timeout
options.timeout = 0
- elif options.valgrind or options.massif or options.cachegrind or options.omega:
+ elif options.valgrind or options.massif or options.cachegrind:
# Non-interactive debuggers: 48 hours
options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60))
elif options.long:
@@ -1109,13 +1108,8 @@ class DocTestController(SageObject):
elif opt.cachegrind:
toolname = "cachegrind"
flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "")
- elif opt.omega:
- toolname = "exp-omega"
- flags = os.getenv("SAGE_OMEGA_FLAGS", "")
cmd = "exec valgrind --tool=%s "%(toolname)
flags += ''' --log-file="%s" ''' % logfile
- if opt.omega:
- toolname = "omega"
if "%s" in flags:
flags %= toolname + ".%p" # replace %s with toolname
cmd += flags + sage_cmd
@@ -1201,10 +1195,10 @@ class DocTestController(SageObject):
"""
opt = self.options
- L = (opt.gdb, opt.valgrind, opt.massif, opt.cachegrind, opt.omega)
+ L = (opt.gdb, opt.valgrind, opt.massif, opt.cachegrind)
if any(L):
if L.count(True) > 1:
- self.log("You may only specify one of gdb, valgrind/memcheck, massif, cachegrind, omega")
+ self.log("You may only specify one of gdb, valgrind/memcheck, massif, cachegrind")
return 2
return self.run_val_gdb()
else:
diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
--- src/sage/interfaces/singular.py.orig 2020-10-24 11:37:59.000000000 -0600
+++ src/sage/interfaces/singular.py 2020-10-30 13:55:37.332649306 -0600
@@ -2349,7 +2349,7 @@ def generate_docstring_dictionary():
nodes.clear()
node_names.clear()
- singular_docdir = SINGULARPATH + "/../info/"
+ singular_docdir = "/usr/share/info/"
new_node = re.compile(r"File: singular\.hlp, Node: ([^,]*),.*")
new_lookup = re.compile(r"\* ([^:]*):*([^.]*)\..*")
@@ -2357,8 +2357,9 @@ def generate_docstring_dictionary():
L, in_node, curr_node = [], False, None
# singular.hlp contains a few iso-5559-1 encoded special characters
- with io.open(os.path.join(singular_docdir, 'singular.hlp'),
- encoding='latin-1') as f:
+ import gzip
+ with gzip.open(os.path.join(singular_docdir, 'singular.hlp.gz'),
+ encoding='utf-8') as f:
for line in f:
m = re.match(new_node,line)
if m:
diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/ext/multidocs.py
--- src/sage_setup/docbuild/ext/multidocs.py.orig 2020-10-24 11:37:59.000000000 -0600
+++ src/sage_setup/docbuild/ext/multidocs.py 2020-10-30 13:55:37.332649306 -0600
@@ -82,8 +82,11 @@ def merge_environment(app, env):
for ind in newalldoc:
# treat subdocument source as orphaned file and don't complain
md = env.metadata.get(ind, dict())
- md['orphan'] = 1
- env.metadata[ind] = md
+ try:
+ md['orphan'] = 1
+ env.metadata[ind] = md
+ except AttributeError:
+ env.metadata[ind] = {'orphan'}
# merge the citations
newcite = {}
for ind, (path, tag, lineno) in citations.items():