sagemath/sagemath-sagedoc.patch
2017-04-06 08:02:52 -04:00

108 lines
5 KiB
Diff

diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
--- src/doc/common/conf.py.orig 2017-03-30 11:27:42.351311111 -0400
+++ src/doc/common/conf.py 2017-03-30 11:27:44.482311193 -0400
@@ -218,7 +218,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', '
html_theme_options['mathjax_macros'] = sage_mathjax_macros()
from pkg_resources import Requirement, working_set
- sagenb_path = working_set.find(Requirement.parse('sagenb')).location
+ sagenb_path = SAGE_SRC
mathjax_relative = os.path.join('sagenb','data','mathjax')
# It would be really nice if sphinx would copy the entire mathjax directory,
diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
--- src/sage/doctest/control.py.orig 2017-03-30 11:27:42.358311112 -0400
+++ src/sage/doctest/control.py 2017-03-30 11:27:44.483311193 -0400
@@ -95,7 +95,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
@@ -270,7 +269,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:
@@ -1030,13 +1029,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
@@ -1096,10 +1090,10 @@ class DocTestController(SageObject):
0
"""
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 2017-03-30 11:27:42.364311112 -0400
+++ src/sage/interfaces/singular.py 2017-03-30 11:27:44.486311193 -0400
@@ -2291,7 +2291,7 @@ def generate_docstring_dictionary():
nodes.clear()
node_names.clear()
- singular_docdir = SAGE_LOCAL+"/share/info/"
+ singular_docdir = os.environ["SINGULAR_BIN_DIR"]+"/info/"
new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*")
new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
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 2017-03-30 11:27:42.371311112 -0400
+++ src/sage_setup/docbuild/ext/multidocs.py 2017-03-30 11:27:44.487311193 -0400
@@ -83,8 +83,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) in docenv.citations.iteritems():
diff -up src/sage_setup/docbuild/__init__.py.orig src/sage_setup/docbuild/__init__.py
--- src/sage_setup/docbuild/__init__.py.orig 2017-03-30 11:27:42.379311112 -0400
+++ src/sage_setup/docbuild/__init__.py 2017-03-30 11:29:25.179315049 -0400
@@ -248,13 +248,14 @@ if NUM_THREADS > 1:
# map_async handles KeyboardInterrupt correctly. Plain map and
# apply_async does not, so don't use it.
x = pool.map_async(target, args, 1)
+ ret = []
try:
- ret = x.get(99999)
+ ret = x.get(3600)
pool.close()
pool.join()
except Exception:
- pool.terminate()
if ABORT_ON_ERROR:
+ pool.terminate()
raise
return ret
else: