/
conf.py
63 lines (50 loc) · 1.39 KB
/
conf.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# -*- coding: utf-8 -*-
import os
import types
import sys
from sphinx.util import logging
# https://github.com/sphinx-doc/sphinx/issues/10112
logging.getLogger('sphinx.ext.extlinks').setLevel(40)
dir_ = os.path.dirname(os.path.realpath(__file__))
def exec_module(path):
globals_ = {}
with open(path, encoding="utf-8") as h:
exec(h.read(), globals_)
module = types.ModuleType("")
module.__dict__.update(globals_)
return module
sys.modules["cairo"] = exec_module(os.path.join(dir_, "..", "cairo", "__init__.pyi"))
extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'sphinx.ext.autodoc',
]
intersphinx_mapping = {
'python3': ('https://docs.python.org/3', None),
}
source_suffix = '.rst'
master_doc = 'index'
project = u'Pycairo'
html_show_copyright = False
exclude_patterns = ['_build']
pygments_style = 'sphinx'
html_theme = "sphinx_rtd_theme"
html_theme_options = {
"display_version": False,
}
html_context = {
'extra_css_files': [
'_static/extra.css',
],
}
html_static_path = [
"extra.css",
]
extlinks = {
'fdobug': ('https://bugs.freedesktop.org/show_bug.cgi?id=%s', '#fdo-'),
'bug': ('https://github.com/pygobject/pycairo/issues/%s', '#'),
'pr': ('https://github.com/pygobject/pycairo/pull/%s', '#pr-'),
'user': ('https://github.com/%s', ''),
}
suppress_warnings = ["image.nonlocal_uri"]
autoclass_content = 'both'