put repo on path

allows autodoc to import jupyterhub without installing it
This commit is contained in:
Min RK
2016-01-13 15:32:21 +01:00
parent 51a04258d1
commit 37d42a336f

View File

@@ -66,13 +66,15 @@ author = u'Project Jupyter team'
# |version| and |release|, also used in various other places throughout the
# built documents.
# Project Jupyter uses the following to autopopulate version
_version_py = '../../jupyterhub/version.py'
version_ns = {}
exec(compile(open(_version_py).read(), _version_py, 'exec'), version_ns)
from os.path import dirname
root = dirname(dirname(dirname(__file__)))
sys.path.insert(0, root)
import jupyterhub
# The short X.Y version.
version = '%i.%i' % version_ns['version_info'][:2]
version = '%i.%i' % jupyterhub.version_info[:2]
# The full version, including alpha/beta/rc tags.
release = version_ns['__version__']
release = jupyterhub.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -381,4 +383,4 @@ if not on_rtd: # only import and set the theme if we're building docs locally
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
# otherwise, readthedocs.org uses their theme by default, so no need to specify it