summarylogtreecommitdiffstats
path: root/sage_docbuild.patch
blob: 3d019d96ae2f2e105af97479f7f4ce6c20f875dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/src/sage/misc/sagedoc_conf.py b/src/sage/misc/sagedoc_conf.py
new file mode 100644
index 00000000..323628a
--- /dev/null
+++ b/src/sage/misc/sagedoc_conf.py
@@ -0,0 +1,6 @@
+r"""
+Sphinx configuration shared by sage.misc.sphinxify and sage_docbuild
+"""
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+default_role = 'math'
diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
index d196965..8cfa8af 100644
--- a/src/sage/misc/sphinxify.py
+++ b/src/sage/misc/sphinxify.py
@@ -87,7 +87,7 @@ def sphinxify(docstring, format='html'):
     os.makedirs(confdir)
     with open(os.path.join(confdir, 'conf.py'), 'w') as filed:
         filed.write(r"""
-from sage_docbuild.conf import *
+from sage.misc.sagedoc_conf import *
 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.todo', 'sphinx.ext.extlinks']
 
 templates_path = ['templates']
diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py
index c0866c0..12a76ac 100644
--- a/src/sage_docbuild/conf.py
+++ b/src/sage_docbuild/conf.py
@@ -14,6 +14,8 @@ from sphinx import highlighting
 import sphinx.ext.intersphinx as intersphinx
 from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer
 
+# Load configuration shared with sage.misc.sphinxify
+from sage.misc.sagedoc_conf import *
 
 # General configuration
 # ---------------------
@@ -149,9 +151,6 @@ release = sage.version.version
 # separators on all platforms.
 exclude_patterns = ['.build']
 
-# The reST default role (used for this markup: `text`) to use for all documents.
-default_role = 'math'
-
 # If true, '()' will be appended to :func: etc. cross-reference text.
 #add_function_parentheses = True