From 4cf90f8139fa675f66a7345410e868a0b338e7ed Mon Sep 17 00:00:00 2001 From: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> Date: Tue, 10 Nov 2026 11:16:55 +0100 Subject: [PATCH] feat: make page build stable against existence of submodules --- .gitignore | 2 +- conf.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4f7cd959f..c497a769d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ *.DS_Store **/__pycache__/* */index.html -_tmp_ngff_spec/ +_temp_ngff_spec/ _build _html_extra .tox diff --git a/conf.py b/conf.py index f39f70cde..47655c0e6 100644 --- a/conf.py +++ b/conf.py @@ -163,6 +163,10 @@ def build_served_html(clean_up=True): for version in displayed_spec_versions: # find 'pre_build.py' in 'specifications' subdirectories + # skip if submodule hasn't been checked out. + if len(os.listdir(f"specifications/{version}")) == 0: + print(f"⚠️ No files found for version {version}") + continue script = glob.glob(f"specifications/{version}/**/pre_build.py", recursive=True)[ 0 ]