summaryrefslogtreecommitdiff
path: root/sphinx/builders/websupport.py
blob: b7a45c570f497e18165f6d342d49137da1d3bff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
"""
    sphinx.builders.websupport
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Builder for the web support package.

    :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from typing import Any, Dict  # NOQA
    from sphinx.application import Sphinx  # NOQA


def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    try:
        from sphinxcontrib.websupport.builder import WebSupportBuilder
        app.add_builder(WebSupportBuilder)
    except ImportError:
        pass

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }