Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/sage_docbuild/conf.py: Do not fail if pplpy doc is not installed #35536

Merged
merged 3 commits into from
May 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/sage_docbuild/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ def set_intersphinx_mappings(app, config):
'python': ('https://docs.python.org/',
os.path.join(SAGE_DOC_SRC, "common",
"python{}.inv".format(python_version))),
'pplpy': (PPLPY_DOCS, None)}
}
if PPLPY_DOCS and os.path.exists(os.path.join(PPLPY_DOCS, 'objects.inv')):
app.config.intersphinx_mapping['pplpy'] = (PPLPY_DOCS, None)
mkoeppe marked this conversation as resolved.
Show resolved Hide resolved
else:
app.config.intersphinx_mapping['pplpy'] = ('https://www.labri.fr/perso/vdelecro/pplpy/latest/', None)

# Add master intersphinx mapping
dst = os.path.join(invpath, 'objects.inv')
Expand Down Expand Up @@ -925,6 +929,7 @@ def setup(app):
app.add_config_value('intersphinx_mapping', {}, False)
app.add_config_value('intersphinx_cache_limit', 5, False)
app.add_config_value('intersphinx_disabled_reftypes', [], False)
app.add_config_value('intersphinx_timeout', None, False)
app.connect('config-inited', set_intersphinx_mappings)
app.connect('builder-inited', intersphinx.load_mappings)
# We do *not* fully initialize intersphinx since we call it by hand
Expand Down