From 51882738953ef83af870ecda8b8adfd58e817ab7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 18 Apr 2023 14:30:41 -0700 Subject: [PATCH 1/3] src/sage_docbuild/conf.py: Do not fail if pplpy doc is not installed --- src/sage_docbuild/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 740a37cf86f..2322a8aeabe 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -231,7 +231,9 @@ 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) # Add master intersphinx mapping dst = os.path.join(invpath, 'objects.inv') From 312e4c58592f473e643ecb598c60ad5ba99ac79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Tue, 2 May 2023 19:49:55 -0700 Subject: [PATCH 2/3] Fall back to upstream url if PPLPY_DOCS is not good Co-authored-by: Isuru Fernando --- src/sage_docbuild/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 2322a8aeabe..dc3e3254edc 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -234,6 +234,8 @@ def set_intersphinx_mappings(app, config): } if PPLPY_DOCS and os.path.exists(os.path.join(PPLPY_DOCS, 'objects.inv')): app.config.intersphinx_mapping['pplpy'] = (PPLPY_DOCS, None) + 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') From 4b7d3e3843b2400700900e621845a8f0cb37bdd7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 3 May 2023 15:31:53 -0700 Subject: [PATCH 3/3] src/sage_docbuild/conf.py: Define intersphinx_timeout so that remote inventory fetch works --- src/sage_docbuild/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index dc3e3254edc..baed329b4f9 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -929,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