diff options
Diffstat (limited to 'doc/conf.py')
| -rw-r--r-- | doc/conf.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 0000000..07823d6 --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,34 @@ +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +from os import environ +from pathlib import Path +from tomllib import loads as toml_loads +import sys + +repo_root = Path(__file__).parent.parent + +sys.path.insert(0, str(repo_root.resolve())) +import patchtree + +project = "patchtree" +release = "???" +extensions = [ + "sphinx.ext.autodoc", + "sphinx_automodapi.automodapi", +] +templates_path = [] +exclude_patterns = [] +html_theme = "alabaster" +html_static_path = [] +autodoc_mock_imports = [project] + +try: + toml = repo_root.joinpath("pyproject.toml").read_text() + pyproject = toml_loads(toml) + release = pyproject["project"]["version"] +except: + pass + +if "RENESAS_INTERNAL" in environ: + extensions.append("lpc_cs_sphinx_renesas_theme") + html_theme = "lpc_cs_sphinx_renesas_theme" |