summarylogtreecommitdiffstats
path: root/sagemath-sphinx-1.8.patch
blob: f54439334a0dedea0e1baa4da3b2caea8a67aa83 (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
--- a/src/sage/misc/sphinxify.py	2018-09-14 20:13:32.788831484 +0200
+++ b/src/sage/misc/sphinxify.py	2018-09-14 20:14:07.142478667 +0200
@@ -64,6 +64,7 @@
         sage: assert n == len(sys.path)
     """
     srcdir = mkdtemp()
+    outdir = mkdtemp()
     base_name = os.path.join(srcdir, 'docstring')
     rst_name = base_name + '.rst'
 
@@ -71,7 +72,7 @@
         suffix = '.html'
     else:
         suffix = '.txt'
-    output_name = base_name + suffix
+    output_name = os.path.join(outdir, 'docstring') + suffix
 
     with open(rst_name, 'w') as filed:
         filed.write(docstring)
@@ -89,7 +90,7 @@
 
     import sys
     old_sys_path = list(sys.path)  # Sphinx modifies sys.path
-    sphinx_app = Sphinx(srcdir, confdir, srcdir, doctreedir, format,
+    sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format,
                         confoverrides, None, None, True)
     sphinx_app.build(None, [rst_name])
     sys.path = old_sys_path