forked from espressif/esp-idf
Tools: Improve the Python package system
Introduce features into the Python package management system & manage package versions outside of ESP-IDF repo.
This commit is contained in:
12
install.ps1
12
install.ps1
@@ -1,18 +1,16 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$IDF_PATH = $PSScriptRoot
|
||||
|
||||
if($args.count -eq 0){
|
||||
$TARGETS = "all"
|
||||
}else
|
||||
{
|
||||
$TARGETS = $args[0] -join ','
|
||||
}
|
||||
$TARGETS = (python "$IDF_PATH/tools/install_util.py" extract targets "$args")
|
||||
|
||||
Write-Output "Installing ESP-IDF tools"
|
||||
Start-Process -Wait -NoNewWindow -FilePath "python" -Args "$IDF_PATH/tools/idf_tools.py install --targets=${TARGETS}"
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # if error
|
||||
|
||||
$FEATURES = (python "$IDF_PATH/tools/install_util.py" extract features "$args")
|
||||
|
||||
Write-Output "Setting up Python environment"
|
||||
Start-Process -Wait -NoNewWindow -FilePath "python" -Args "$IDF_PATH/tools/idf_tools.py install-python-env"
|
||||
Start-Process -Wait -NoNewWindow -FilePath "python" -Args "$IDF_PATH/tools/idf_tools.py install-python-env --features=${FEATURES}"
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE} # if error
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user