Skip to content

Commit

Permalink
added tip from readthedocs readme to help out with numpy imports, may…
Browse files Browse the repository at this point in the history
… not work as c librarys won't install on readthedocs
  • Loading branch information
AndrewAnnex committed Nov 22, 2014
1 parent 45a8a61 commit 15b0598
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
import sys
import os

# EXTRA BITS FOR SPICEYPY
from unittest.mock import MagicMock


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


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

# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down

0 comments on commit 15b0598

Please sign in to comment.