From 1eef0ccaa3e2ff5cb37b41dbdcd01d330fa6956b Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 26 Jul 2026 23:37:17 -0700 Subject: [PATCH] Restore checkout venv after apt docs install --- docs/test_codeblocks_manifest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/test_codeblocks_manifest.py b/docs/test_codeblocks_manifest.py index 79063387..946c9bf3 100644 --- a/docs/test_codeblocks_manifest.py +++ b/docs/test_codeblocks_manifest.py @@ -435,7 +435,9 @@ def run_snippets(snippet_ids: tuple[str, ...]) -> None: current_python = ROOT / ".venv" / "bin" / "python" if not current_python.exists(): current_python = Path(sys.executable) + current_uv = Path(env["UV_BINARY"]) assert current_python.is_file() and os.access(current_python, os.X_OK) + assert current_uv.is_file() and os.access(current_uv, os.X_OK) checkout_import_root = system_home / "current-checkout" shutil.copytree( ROOT / "archivebox", @@ -450,6 +452,9 @@ def run_snippets(snippet_ids: tuple[str, ...]) -> None: archivebox_wrapper = local_bin_dir / "archivebox" archivebox_wrapper.write_text( "#!/usr/bin/env bash\n" + f'if ! {current_python} -c "import rich.panel" >/dev/null 2>&1; then\n' + f" (cd {ROOT} && {current_uv} --no-cache sync --locked --dev >/dev/null)\n" + "fi\n" f'export PYTHONPATH="{checkout_import_root}${{PYTHONPATH:+:${{PYTHONPATH}}}}"\n' f'exec {current_python} -m archivebox "$@"\n', )