bootstrap: prompt to install in editable mode when run interactively inside git checkout (default yes)
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
@@ -144,6 +144,21 @@ if (-not (Test-Path $venvPython)) { Write-Log "Created venv but could not find p
|
||||
Write-Log "Using venv python: $venvPython"
|
||||
|
||||
if (-not $NoInstall) {
|
||||
# Suggest editable install for development checkouts (interactive git clones)
|
||||
if (-not $Editable) {
|
||||
$isGit = $false
|
||||
try {
|
||||
if (Test-Path (Join-Path $repoRoot '.git')) { $isGit = $true }
|
||||
elseif ((Get-Command git -ErrorAction SilentlyContinue) -ne $null) {
|
||||
try { $gitOut = & git -C $repoRoot rev-parse --is-inside-work-tree 2>$null; if ($gitOut -eq 'true') { $isGit = $true } } catch {}
|
||||
}
|
||||
} catch {}
|
||||
if ($isGit -and -not $Quiet) {
|
||||
$ans = Read-Host "It looks like this is a development checkout (git repo). Install project in editable mode for development? (Y/n)"
|
||||
if ($ans -eq '' -or $ans -eq 'y' -or $ans -eq 'Y') { $Editable = $true; Write-Log "Selected editable install for development." "INFO" }
|
||||
}
|
||||
}
|
||||
|
||||
Write-Log "Upgrading pip, setuptools, wheel"
|
||||
try { & $venvPython -m pip install -U pip setuptools wheel } catch { Write-Log "pip upgrade failed: $_" "ERROR"; exit 5 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user