-
Notifications
You must be signed in to change notification settings - Fork 307
Expand file tree
/
Copy pathconf.py
More file actions
47 lines (39 loc) · 1.48 KB
/
Copy pathconf.py
File metadata and controls
47 lines (39 loc) · 1.48 KB
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
# Sphinx configuration for the libCEC Python (SWIG) API.
#
# The `cec` module is generated by SWIG from src/libcec/libcec.i, which
# %include's cec.h and cectypes.h. The docs pipeline (docs.yml) runs
# swig -python -py3 -doxygen ... -o <gen>/cec_wrap.cxx src/libcec/libcec.i
# so SWIG carries cec.h's Doxygen comments into `cec.py` as Python docstrings.
# We do NOT compile/link the native `_cec` extension here — importing the pure
# Python wrapper is enough for autodoc, so the C extension is mocked. The path
# to the generated cec.py is passed in via the CEC_PY_MODULE_DIR env var.
import os
import sys
gen_dir = os.environ.get("CEC_PY_MODULE_DIR")
if gen_dir:
sys.path.insert(0, gen_dir)
project = "libCEC Python API"
copyright = "Pulse-Eight Limited"
author = "Pulse-Eight Limited"
release = os.environ.get("LIBCEC_VERSION", "")
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]
# The compiled SWIG extension is not built for the docs; mock it so `import cec`
# (which does `from . import _cec` / `import _cec`) succeeds during autodoc.
autodoc_mock_imports = ["_cec"]
autodoc_default_options = {
"members": True,
"undoc-members": True,
"show-inheritance": True,
}
autodoc_member_order = "bysource"
templates_path = []
exclude_patterns = ["_build"]
# furo is a clean, responsive theme with light/dark support.
html_theme = "furo"
html_title = "libCEC Python API"
html_logo = "../assets/pulse-eight-logo.png"
html_static_path = []