From 7d9577f2913e0400310b87e70f6e9b7c4ddccd77 Mon Sep 17 00:00:00 2001 From: hategan Date: Thu, 3 Dec 2026 09:45:30 -0800 Subject: [PATCH] The tool to generate top level docs (docs/generate.py) uses the current pip environment and does not inherit PYTHONPATH. This means it does not use packages installed in dst / '.packages'. As a consequence, the build of some older doc versions fails. This patch installs the base dependencies in the venv, which hopefully makes things work. --- web/build-versions | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/build-versions b/web/build-versions index c114cd70..e047901b 100644 --- a/web/build-versions +++ b/web/build-versions @@ -71,6 +71,11 @@ standard-imghdr ''') +def install_base_packages() -> None: + _run(['pip', 'install', '-r', 'requirements.txt']) + _run(['pip', 'uninstall', 'psij-python']) + + def install_packages(dst: Path) -> None: check_deps(dst.parent) _run(['pip', 'install', '-r', 'requirements-docs.txt', '-t', str(dst)], cwd=dst.parent) @@ -96,6 +101,7 @@ def run() -> None: print('.', end='') pd = dst / '.packages' pd.mkdir(parents=True, exist_ok=True) + install_base_packages() install_packages(pd) print('.', end='') out = Path('docs').absolute() / '.web-build' / 'v' / label @@ -105,6 +111,7 @@ def run() -> None: except Exception as ex: traceback.print_exc() print(f'Failed to build docs for {label}') + raise print()