mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
Changed mock back
This commit is contained in:
parent
161fc0c26b
commit
00fa1d64e5
1 changed files with 18 additions and 18 deletions
36
doc/conf.py
36
doc/conf.py
|
|
@ -93,26 +93,26 @@ import sys, os
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
## Mock out imports with C dependencies because ReadTheDocs can't build them.
|
## Mock out imports with C dependencies because ReadTheDocs can't build them.
|
||||||
#class Mock(object):
|
class Mock(object):
|
||||||
#def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
#pass
|
pass
|
||||||
|
|
||||||
#def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
#return Mock()
|
return Mock()
|
||||||
|
|
||||||
#@classmethod
|
@classmethod
|
||||||
#def __getattr__(cls, name):
|
def __getattr__(cls, name):
|
||||||
#if name in ('__file__', '__path__'):
|
if name in ('__file__', '__path__'):
|
||||||
#return '/dev/null'
|
return '/dev/null'
|
||||||
#elif name[0] == name[0].upper():
|
elif name[0] == name[0].upper():
|
||||||
#mockType = type(name, (), {})
|
mockType = type(name, (), {})
|
||||||
#mockType.__module__ = __name__
|
mockType.__module__ = __name__
|
||||||
#return mockType
|
return mockType
|
||||||
#else:
|
else:
|
||||||
#return Mock()
|
return Mock()
|
||||||
|
|
||||||
sys.path.append("../GPy")
|
#sys.path.append("../GPy")
|
||||||
import mock
|
#import mock
|
||||||
|
|
||||||
MOCK_MODULES = ['pylab', 'matplotlib']#'matplotlib', 'matplotlib.color', 'matplotlib.pyplot', 'pylab' ]
|
MOCK_MODULES = ['pylab', 'matplotlib']#'matplotlib', 'matplotlib.color', 'matplotlib.pyplot', 'pylab' ]
|
||||||
for mod_name in MOCK_MODULES:
|
for mod_name in MOCK_MODULES:
|
||||||
|
|
@ -121,7 +121,7 @@ for mod_name in MOCK_MODULES:
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
#sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
|
||||||
# If your extensions are in another directory, add it here. If the directory
|
# If your extensions are in another directory, add it here. If the directory
|
||||||
# is relative to the documentation root, use os.path.abspath to make it
|
# is relative to the documentation root, use os.path.abspath to make it
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue