summarylogtreecommitdiffstats
path: root/sagemath-sphinx-1.8.patch
blob: c153be175f8e6a6a9835272cd3eab15e4ca4f356 (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
@@ -68,6 +68,7 @@
         sage: assert n == len(sys.path)
     """
     srcdir = mkdtemp()
+    outdir = mkdtemp()
     base_name = os.path.join(srcdir, 'docstring')
     rst_name = base_name + '.rst'
 
@@ -75,7 +76,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)
@@ -93,7 +94,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