Show More
@@ -16,6 +16,7 | |||
|
16 | 16 | # serve to show the default value. |
|
17 | 17 | |
|
18 | 18 | import sys, os |
|
19 | from pathlib import Path | |
|
19 | 20 | |
|
20 | 21 | # http://read-the-docs.readthedocs.io/en/latest/faq.html |
|
21 | 22 | ON_RTD = os.environ.get('READTHEDOCS', None) == 'True' |
@@ -25,8 +26,8 if ON_RTD: | |||
|
25 | 26 | |
|
26 | 27 | # RTD doesn't use the Makefile, so re-run autogen_{things}.py here. |
|
27 | 28 | for name in ('config', 'api', 'magics', 'shortcuts'): |
|
28 | fname = 'autogen_{}.py'.format(name) | |
|
29 |
fpath = |
|
|
29 | fname = Path('autogen_{}.py'.format(name)) | |
|
30 | fpath = (Path(__file__).parent).joinpath('..', fname) | |
|
30 | 31 | with open(fpath) as f: |
|
31 | 32 | exec(compile(f.read(), fname, 'exec'), { |
|
32 | 33 | '__file__': fpath, |
General Comments 0
You need to be logged in to leave comments.
Login now