From a7f8725c86b7dfcc35fcf26bb9304e3d57f9cffc Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 3 Nov 2026 12:33:10 +0000 Subject: [PATCH] Add build option to skip intersphinx locally, add pixi to .gitignore Skipping intersphinx helps when you build in locked-down containers, that can't reach out to the dozen (or 100+?) locations that intersphinx wants to access. And when you're working on a single page, you locally just want to check how it renders, and usually don't need intersphinx anyway. Also add the default Pixi content to .gitignore, useful when that's your preferred (or only available) build tool rather than invoking `nox` directly. --- .gitignore | 4 ++++ source/conf.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 301e238bb7..04e7649f1f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ build/ __pycache__ .DS_Store /locales/ + +# pixi environments +.pixi/* +!.pixi/config.toml diff --git a/source/conf.py b/source/conf.py index 68ec32a28a..e2ed462c8b 100644 --- a/source/conf.py +++ b/source/conf.py @@ -248,6 +248,12 @@ "virtualenv": ("https://virtualenv.pypa.io/en/stable/", None), } +# Local builds can skip external inventories when network access is restricted. +# Sphinx injects `tags` when loading this configuration. +if tags.has("skip-intersphinx"): # noqa: F821 + intersphinx_mapping = {} + suppress_warnings = ["ref.*"] + # -- Options for todo extension -------------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration