From 97449e5b02ff12b4add2f962c4575d95a9e4bb34 2015-08-11 20:19:46 From: Min RK Date: 2015-08-11 20:19:46 Subject: [PATCH] run autogen_config,api,magics on RTD --- diff --git a/docs/source/conf.py b/docs/source/conf.py index 3b56334..5843c68 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,14 @@ if ON_RTD: # see # http://read-the-docs.readthedocs.org/en/latest/faq.html tags.add('rtd') - + + # RTD doesn't use the Makefile, so re-run autogen_{things}.py here. + for name in ('config', 'api', 'magics'): + fname = 'autogen_{}.py'.format(name) + fpath = os.path.abspath(os.path.join('..', fname)) + with open(fpath) as f: + exec(compile(f.read(), fname, 'exec'), {'__file__': fpath}) + # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here.