Skip to content

Commit

Permalink
doc: fix api on rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
ponty committed Nov 4, 2015
1 parent b82b6d0 commit ea73330
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 18 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# import sphinx
import sys
import os
try:
# python 3.3+
from unittest.mock import MagicMock
except ImportError:
from mock import Mock as MagicMock

project = 'pysimavr'
author = 'ponty'
Expand Down Expand Up @@ -50,9 +55,21 @@

# remove blank pages from pdf
# http://groups.google.com/group/sphinx-
# dev/browse_thread/thread/92e19267d095412d/d60dcba483c6b13d
# dev/browse_thread/thread/9_ac_input2e19267d095412d/d60dcba483c6b13d
latex_font_size = '10pt,oneside'

latex_elements = dict(
papersize='a4paper',
)


# http://read-the-docs.readthedocs.org/en/latest/faq.html
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()

MOCK_MODULES = ['_ac_input','_hd44780','_inverter','_ledrow','_sgm7','_simavr']
# MOCK_MODULES = ['pysimavr.swig.' + m for m in MOCK_MODULES]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

3 changes: 2 additions & 1 deletion requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
paver
path.py
cogapp==2.3
sphinx
sphinx
mock

0 comments on commit ea73330

Please sign in to comment.