Skip to content

Commit

Permalink
use mock objects to fix build issues on readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Scisco committed May 29, 2015
1 parent 854e27b commit 49d1139
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@
# serve to show the default.

import sys
import os
from mock import Mock as MagicMock

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

MOCK_MODULES = ['numpy', 'rasterio', 'scipy', 'scikit-image', 'homura', 'boto']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

import os
import sphinx_rtd_theme

# 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
Expand Down

0 comments on commit 49d1139

Please sign in to comment.