Add build script
This commit is contained in:
9
run.ps1
9
run.ps1
@@ -18,6 +18,15 @@ if (!(Test-Path $venv)) {
|
||||
$python = Join-Path $venv "Scripts/python.exe"
|
||||
$pythonw = Join-Path $venv "Scripts/pythonw.exe"
|
||||
|
||||
# Graceful handling when Python is not present / venv creation failed
|
||||
if (!(Test-Path $python)) {
|
||||
Write-Host "Python/venv not available. You can either:" -ForegroundColor Yellow
|
||||
Write-Host " 1) Install Python 3.11+ (winget install -e --id Python.Python.3.11), or" -ForegroundColor Yellow
|
||||
Write-Host " 2) Use the prebuilt binary: set BG_USE_BINARY=1 and run bootstrap.ps1" -ForegroundColor Yellow
|
||||
Write-Host " iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap.ps1 | iex" -ForegroundColor DarkGray
|
||||
throw "Python interpreter not found at $python"
|
||||
}
|
||||
|
||||
& $python -m pip install --upgrade pip | Out-Null
|
||||
& $python -m pip install -r (Join-Path $root "requirements.txt")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user