diff --git a/doc/source/conf.py b/doc/source/conf.py index f705064b..552f305d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -36,6 +36,20 @@ extensions = [ 'sphinx.ext.viewcode', ] +import sys +try: + from unittest.mock import MagicMock +except: + from mock import Mock as MagicMock + +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return Mock() + +MOCK_MODULES = [] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -60,9 +74,15 @@ author = u'GPy Authors' # built documents. # # The short X.Y version. -version = '0.8.8' +with open('../../GPy/__version__.py', 'r') as f: + version = f.read() + release = version + +print version + +# version = '0.8.8' # The full version, including alpha/beta/rc tags. -release = '0.8.8' +# release = '0.8.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.