diff --git a/templates/sphinx-conf.py b/templates/sphinx-conf.py index 31fa2ebe15b6264b476def022227b665aff0dba8..79c930a56bc5f975a2a1b35605bbc69233cb0222 100644 --- a/templates/sphinx-conf.py +++ b/templates/sphinx-conf.py @@ -216,8 +216,13 @@ autodoc_default_flags = [ ] # For inter-documentation mapping: -from bob.extension.utils import link_documentation -intersphinx_mapping = link_documentation() +from bob.extension.utils import link_documentation, load_requirements +sphinx_requirements = "extra-intersphinx.txt" +if os.path.exists(sphinx_requirements): + intersphinx_mapping = link_documentation(additional_packages=load_requirements(sphinx_requirements)) +else: + intersphinx_mapping = link_documentation() + # We want to remove all private (i.e. _. or __.__) members # that are not in the list of accepted functions @@ -237,4 +242,4 @@ def member_function_test(app, what, name, obj, skip, options): return False def setup(app): - app.connect('autodoc-skip-member', member_function_test) \ No newline at end of file + app.connect('autodoc-skip-member', member_function_test)