diff --git a/doc/source/conf.py b/doc/source/conf.py index de5bb5da9..795d6e704 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -19,7 +19,6 @@ # import os import sys -sys.path.append(os.path.abspath('../../')) sys.path.append(os.path.abspath('.')) from mock_missing import mock_modules diff --git a/doc/source/developer.rst b/doc/source/developer.rst index 3b74ddd68..6cfda5df9 100644 --- a/doc/source/developer.rst +++ b/doc/source/developer.rst @@ -39,19 +39,3 @@ for each user. remoteappmanager.services.hub remoteappmanager.services.reverse_proxy - -REST tornado ------------- - -A generic implementation of Rest APIs using tornado. - -.. autosummary:: - :toctree: api - :template: module_template.rst - - remoteappmanager.rest.exceptions - remoteappmanager.rest.registry - remoteappmanager.rest.resource - remoteappmanager.rest.rest_handler - remoteappmanager.rest.http.payloaded_http_error - diff --git a/doc/source/mock_missing.py b/doc/source/mock_missing.py index 55fade065..5b050ce42 100644 --- a/doc/source/mock_missing.py +++ b/doc/source/mock_missing.py @@ -42,6 +42,23 @@ def mock_modules(): else: del pamela + try: + import jupyterhub + except ImportError: + MOCK_MODULES.append('jupyterhub') + MOCK_MODULES.append('jupyterhub.auth') + MOCK_MODULES.append('jupyterhub.spawner') + else: + del jupyterhub + + try: + import docker + except ImportError: + MOCK_MODULES.append('docker') + MOCK_MODULES.append('docker.errors') + else: + del docker + TYPES = { mock_type: type(mock_type, bases, {'__module__': path}) for path, mock_type, bases in MOCK_TYPES} diff --git a/setup.py b/setup.py index f9b1ce116..bd774fafe 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,11 @@ # provides 2.11.1 on_rtd = os.environ.get('READTHEDOCS') == 'True' -if not on_rtd: +if on_rtd: + # These are the dependencies of jupyterhub that we need to have in order + # for our code to import on RTD. + requirements.extend(["sqlalchemy>=1.0"]) +else: requirements.extend(["jupyterhub>=0.7.0dev0", "docker-py>=1.8"]) # main setup configuration class