Skip to content

Commit 8177101

Browse files
committed
workaround rtfd issues
1 parent 52e460f commit 8177101

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

docs/conf.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,28 @@
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
1515

16+
1617
import sys
1718
import os
19+
from mock import Mock as MagicMock
20+
21+
22+
PY2 = sys.version_info[0] == 2
23+
24+
25+
class Mock(MagicMock):
26+
@classmethod
27+
def __getattr__(cls, name):
28+
return Mock()
29+
30+
31+
MOCK_MODULES = []
32+
if PY2:
33+
MOCK_MODULES.append('lzma')
34+
35+
36+
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
37+
1838

1939
# If extensions (or modules to document with autodoc) are in another directory,
2040
# add these directories to sys.path here. If the directory is relative to the
@@ -33,7 +53,6 @@
3353
extensions = [
3454
'sphinx.ext.autodoc',
3555
'sphinx.ext.autosummary',
36-
'sphinx.ext.intersphinx',
3756
'sphinx.ext.viewcode',
3857
'numpydoc',
3958
]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ deps =
2020
-rrequirements.txt
2121

2222
[testenv:docs]
23-
basepython = python3.5
23+
basepython = python2.7
2424
changedir = docs
2525
deps =
2626
-rrequirements_rtfd.txt

0 commit comments

Comments
 (0)