Skip to content

Commit

Permalink
Fix missed modules for Readthedocs (#23, #26)
Browse files Browse the repository at this point in the history
  • Loading branch information
a5kin committed Dec 3, 2017
1 parent 57ceca8 commit e761ff4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#
import os
import sys
from unittest.mock import MagicMock

sys.path.insert(0, os.path.abspath('..'))


Expand All @@ -31,10 +33,12 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.githubpages']
'sphinx.ext.githubpages'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -171,4 +175,13 @@
]


class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()


MOCK_MODULES = [
'numpy', 'pycuda', 'pycuda.autoinit', 'pycuda.compiler', 'pycuda.gpuarray'
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

0 comments on commit e761ff4

Please sign in to comment.