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