build rest-api on RTD

This commit is contained in:
Min RK
2016-07-23 12:05:50 +02:00
parent 19ae38c108
commit d03a1ee490

View File

@@ -67,7 +67,8 @@ author = u'Project Jupyter team'
# built documents.
# Project Jupyter uses the following to autopopulate version
from os.path import dirname
root = dirname(dirname(dirname(__file__)))
docs = dirname(dirname(__file__))
root = dirname(docs)
sys.path.insert(0, root)
import jupyterhub
@@ -382,5 +383,8 @@ if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
else:
# build rest-api, since RTD doesn't run make
from subprocess import check_call as sh
sh(['make', 'rest-api'], cwd=docs)
# otherwise, readthedocs.org uses their theme by default, so no need to specify it