docs: finalize verified local workbench delivery

This commit is contained in:
Codex
2026-10-11 14:21:25 +08:00
parent 603184549b
commit 646e60a256
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -6,12 +6,14 @@ New-Item -ItemType Directory -Path $runtimePath -Force | Out-Null
$pythonPath = Join-Path $projectRoot '.venv\Scripts\python.exe'
if (-not (Test-Path -LiteralPath $pythonPath)) {
if (Get-Command py.exe -ErrorAction SilentlyContinue) {
& py.exe -3.12 -m venv (Join-Path $projectRoot '.venv')
& py.exe -3 -m venv (Join-Path $projectRoot '.venv')
} elseif (Get-Command python.exe -ErrorAction SilentlyContinue) {
& python.exe -m venv (Join-Path $projectRoot '.venv')
} else { throw 'Please install Python 3.12+ first.' }
if ($LASTEXITCODE -ne 0) { throw 'Could not create Python environment.' }
}
& $pythonPath -c "import sys; raise SystemExit(0 if sys.version_info >= (3, 12) else 1)"
if ($LASTEXITCODE -ne 0) { throw 'Python 3.12+ is required; recreate .venv with a supported interpreter.' }
& $pythonPath -c "import fastapi, uvicorn, requests, bs4, openpyxl, multipart, playwright" 2>$null
if ($LASTEXITCODE -ne 0) {
$env:PIP_CACHE_DIR = Join-Path $runtimePath 'pip-cache'