1515
1616import sphinx
1717
18- class Mock (object ):
19- def __init__ (self , * args , ** kwargs ):
20- pass
21-
22- def __call__ (self , * args , ** kwargs ):
23- return Mock ()
24-
25- @classmethod
26- def __getattr__ (self , name ):
27- if name in ('__file__' , '__path__' ):
28- return '/dev/null'
29- elif name [0 ] == name [0 ].upper ():
30- return type (name , (), {})
31- else :
32- return Mock ()
33-
34- MOCK_MODULES = ['numpy' , 'numpy.fft' , 'scipy' , 'matplotlib' , 'cython' , 'matplotlib.pyplot' , 'matplotlib.collections' , 'matplotlib.patches' ,
35- 'commpy.channelcoding.acstb' , 'commpy.channelcoding.map_c' , 'numpy.random' ]
18+ import mock
19+
20+ #class Mock(object):
21+ # def __init__(self, *args, **kwargs):
22+ # pass
23+
24+ # def __call__(self, *args, **kwargs):
25+ # return Mock()
26+
27+ # @classmethod
28+ # def __getattr__(self, name):
29+ # if name in ('__file__', '__path__'):
30+ # return '/dev/null'
31+ # elif name[0] == name[0].upper():
32+ # return type(name, (), {})
33+ # else:
34+ # return Mock()
35+
36+ MOCK_MODULES = ['numpy' , 'numpy.fft' , 'scipy' , 'matplotlib' , 'matplotlib.pyplot' ,
37+ 'matplotlib.collections' , 'matplotlib.patches' ,
38+ 'commpy.channelcoding' , 'numpy.random' ]
3639for mod_name in MOCK_MODULES :
37- sys .modules [mod_name ] = Mock ()
40+ #sys.modules[mod_name] = Mock()
41+ sys .modules [mod_name ] = mock .Mock ()
3842
3943# If extensions (or modules to document with autodoc) are in another directory,
4044# add these directories to sys.path here. If the directory is relative to the
4145# documentation root, use os.path.abspath to make it absolute, like shown here.
42- sys .path .insert (0 , os .path .abspath ('/home/veeresht//Development/commpy-dev/commpy-dev-py27/commpy/commpy' ))
46+ # sys.path.insert(0, os.path.abspath('/home/veeresht//Development/commpy-dev/commpy-dev-py27/commpy/commpy'))
4347sys .path .insert (0 , os .path .abspath ('sphinxext' ))
4448# -- General configuration -----------------------------------------------------
4549
@@ -48,8 +52,8 @@ def __getattr__(self, name):
4852
4953# Add any Sphinx extension module names here, as strings. They can be extensions
5054# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
51- extensions = ['sphinx.ext.autodoc' , 'sphinx.ext.doctest' ,
52- 'sphinx.ext.todo' , 'sphinx.ext.coverage' ,
55+ extensions = ['sphinx.ext.autodoc' , 'sphinx.ext.doctest' ,
56+ 'sphinx.ext.todo' , 'sphinx.ext.coverage' ,
5357 'sphinx.ext.mathjax' , 'sphinx.ext.autosummary' , 'sphinx.ext.intersphinx' , 'numpydoc' ]
5458
5559# Add any paths that contain templates here, relative to this directory.
@@ -274,6 +278,6 @@ def __getattr__(self, name):
274278# Autosummary
275279# -----------------------------------------------------------------------------
276280
277- if sphinx .__version__ >= "0.7" :
281+ if sphinx .__version__ >= "0.7" :
278282 import glob
279283 autosummary_generate = glob .glob ("*.rst" )
0 commit comments