Skip to content

Commit

Permalink
Add task to upgrade PlotPyStack environment
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Mar 11, 2024
1 parent 0f9808c commit a6f8a8a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,35 @@
}
},
{
"label": "Upgrade environment",
"label": "Upgrade PlotPyStack packages",
"type": "shell",
"command": "cmd",
"args": [
"/c",
"upgrade_stack.bat"
],
"options": {
"cwd": "scripts",
"env": {
"UNATTENDED": "1",
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
}
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "⚠️ Upgrade whole environment ⚠️",
"type": "shell",
"command": "cmd",
"args": [
Expand Down
27 changes: 27 additions & 0 deletions scripts/upgrade_stack.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@echo off
REM This script was derived from PythonQwt project
REM ======================================================
REM Upgrade environment, but only PlotPyStack packages
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================
setlocal enabledelayedexpansion
call %~dp0utils GetScriptPath SCRIPTPATH
cd %SCRIPTPATH%\..

:: Iterate over all directories in the grandparent directory
:: (WinPython base directories)
call %FUNC% GetPythonExeGrandParentDir DIR0
for /D %%d in ("%DIR0%*") do (
set WINPYDIRBASE=%%d
call !WINPYDIRBASE!\scripts\env.bat
echo Upgrading environment for "%%d":
python -m pip install --upgrade pip
python -m pip install --upgrade PythonQwt guidata
echo ----
)

%PYTHON% -m pip list > dev\pip_list.txt
call %FUNC% EndOfScript

0 comments on commit a6f8a8a

Please sign in to comment.