diff options
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r-- | doc/source/conf.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 41b5cee25..d08f29e59 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -2,6 +2,7 @@ import os import re import sys +import importlib # Minimum version, enforced by sphinx needs_sphinx = '3.2.0' @@ -86,6 +87,16 @@ extensions = [ 'sphinx.ext.mathjax', ] +skippable_extensions = [ + ('breathe', 'skip generating C/C++ API from comment blocks.'), +] +for ext, warn in skippable_extensions: + ext_exist = importlib.util.find_spec(ext) is not None + if ext_exist: + extensions.append(ext) + else: + print(f"Unable to find Sphinx extension '{ext}', {warn}.") + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -477,3 +488,11 @@ class NumPyLexer(CLexer): inherit, ], } + + +# ----------------------------------------------------------------------------- +# Breathe & Doxygen +# ----------------------------------------------------------------------------- +breathe_projects = dict(numpy=os.path.join("..", "build", "doxygen", "xml")) +breathe_default_project = "numpy" +breathe_default_members = ("members", "undoc-members", "protected-members") |