##// END OF EJS Templates
unmock some read-the-docs modules...
Matthias BUSSONNIER -
Show More
@@ -24,26 +24,7 b' if ON_RTD:'
24 # see
24 # see
25 # http://read-the-docs.readthedocs.org/en/latest/faq.html
25 # http://read-the-docs.readthedocs.org/en/latest/faq.html
26 tags.add('rtd')
26 tags.add('rtd')
27 class Mock(object):
27
28 def __init__(self, *args, **kwargs):
29 pass
30
31 def __call__(self, *args, **kwargs):
32 return Mock()
33
34 @classmethod
35 def __getattr__(self, name):
36 if name in ('__file__', '__path__'):
37 return '/dev/null'
38 elif name[0] == name[0].upper():
39 return type(name, (), {})
40 else:
41 return Mock()
42
43 MOCK_MODULES = ['matplotlib', 'matplotlib.sphinxext', 'numpy']
44 for mod_name in MOCK_MODULES:
45 sys.modules[mod_name] = Mock()
46
47 # If your extensions are in another directory, add it here. If the directory
28 # If your extensions are in another directory, add it here. If the directory
48 # is relative to the documentation root, use os.path.abspath to make it
29 # is relative to the documentation root, use os.path.abspath to make it
49 # absolute, like shown here.
30 # absolute, like shown here.
@@ -63,9 +44,9 b" execfile('../../IPython/core/release.py',iprelease)"
63 # Add any Sphinx extension module names here, as strings. They can be extensions
44 # Add any Sphinx extension module names here, as strings. They can be extensions
64 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
45 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
65 extensions = [
46 extensions = [
66 # 'matplotlib.sphinxext.mathmpl',
47 'matplotlib.sphinxext.mathmpl',
67 'matplotlib.sphinxext.only_directives',
48 'matplotlib.sphinxext.only_directives',
68 # 'matplotlib.sphinxext.plot_directive',
49 'matplotlib.sphinxext.plot_directive',
69 'sphinx.ext.autodoc',
50 'sphinx.ext.autodoc',
70 'sphinx.ext.doctest',
51 'sphinx.ext.doctest',
71 'inheritance_diagram',
52 'inheritance_diagram',
General Comments 0
You need to be logged in to leave comments. Login now