Rename app and document virtual environment setup
This commit is contained in:
+10
-3
@@ -1,8 +1,15 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (-not (Test-Path -LiteralPath ".venv\Scripts\python.exe")) {
|
||||
py -m venv .venv
|
||||
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
Set-Location -LiteralPath $projectRoot
|
||||
|
||||
if (-not (Get-Command py -ErrorAction SilentlyContinue)) {
|
||||
throw "Python 3.11 or newer is required. Install Python from python.org, then run this script again."
|
||||
}
|
||||
|
||||
& .venv\Scripts\python.exe -m pip install -r requirements.txt
|
||||
if (-not (Test-Path -LiteralPath ".venv\Scripts\python.exe")) {
|
||||
& py -3 -m venv .venv
|
||||
}
|
||||
|
||||
& .venv\Scripts\python.exe -m pip install --disable-pip-version-check -r requirements.txt
|
||||
& .venv\Scripts\python.exe app.py
|
||||
|
||||
Reference in New Issue
Block a user