Commit 72a77c67 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Fix documentation build

parent 581598c2
nibabel
nibabel.fileslice
numpy
numpy.linalg
scipy
scipy.ndimage
......@@ -69,17 +69,17 @@ class doc(Command):
except:
import mock
mockedModules = [
'nibabel',
'nibabel.fileslice',
'numpy',
'numpy.linalg']
mockobj = mock.MagicMock()
mockedModules = { m : mockobj for m in mockedModules}
mockobj.__version__ = '2.2.0'
mockedModules = open(op.join(docdir, 'mock_modules.txt')).readlines()
mockedModules = [l.strip() for l in mockedModules]
mockedModules = {m : mockobj for m in mockedModules}
patches = [mock.patch.dict('sys.modules', **mockedModules)]
with mock.patch.dict('sys.modules', **mockedModules):
sphinx.main(['sphinx-build', docdir, destdir])
[p.start() for p in patches]
sphinx.main(['sphinx-build', docdir, destdir])
[p.stop() for p in patches]
setup(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment