mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
put repo on path
allows autodoc to import jupyterhub without installing it
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user