Fix dependency errors

This commit is contained in:
Takeshi KOMIYA 2017-04-30 01:04:30 +09:00
parent 4de4fd060a
commit b9b982d5f0
3 changed files with 11 additions and 4 deletions

View File

@ -9,8 +9,6 @@
:license: BSD, see LICENSE for details.
"""
from sphinxcontrib.websupport.builder import WebSupportBuilder
if False:
# For type annotation
from typing import Any, Dict # NOQA
@ -19,7 +17,11 @@ if False:
def setup(app):
# type: (Sphinx) -> Dict[unicode, Any]
app.add_builder(WebSupportBuilder)
try:
from sphinxcontrib.websupport.builder import WebSupportBuilder
app.add_builder(WebSupportBuilder)
except ImportError:
pass
return {
'version': 'builtin',

View File

@ -7,4 +7,8 @@
:license: BSD, see LICENSE for details.
"""
from sphinxcontrib.websupport.utils import is_commentable # NOQA
try:
from sphinxcontrib.websupport.utils import is_commentable # NOQA
except ImportError:
def is_commentable(node):
raise RuntimeError

View File

@ -9,6 +9,7 @@ deps=
mock
enum34
typing
sphinxcontrib-websupport
setenv =
SPHINX_TEST_TEMPDIR = {envdir}/testbuild
PYTHONDONTWRITEBYTECODE = true