Skip to content

Commit a6f8a8a

Browse files
committed
Add task to upgrade PlotPyStack environment
1 parent 0f9808c commit a6f8a8a

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

.vscode/tasks.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,35 @@
174174
}
175175
},
176176
{
177-
"label": "Upgrade environment",
177+
"label": "Upgrade PlotPyStack packages",
178+
"type": "shell",
179+
"command": "cmd",
180+
"args": [
181+
"/c",
182+
"upgrade_stack.bat"
183+
],
184+
"options": {
185+
"cwd": "scripts",
186+
"env": {
187+
"UNATTENDED": "1",
188+
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
189+
}
190+
},
191+
"group": {
192+
"kind": "build",
193+
"isDefault": true
194+
},
195+
"presentation": {
196+
"echo": true,
197+
"reveal": "always",
198+
"focus": false,
199+
"panel": "shared",
200+
"showReuseMessage": true,
201+
"clear": false
202+
}
203+
},
204+
{
205+
"label": "⚠️ Upgrade whole environment ⚠️",
178206
"type": "shell",
179207
"command": "cmd",
180208
"args": [

scripts/upgrade_stack.bat

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
REM This script was derived from PythonQwt project
3+
REM ======================================================
4+
REM Upgrade environment, but only PlotPyStack packages
5+
REM ======================================================
6+
REM Licensed under the terms of the MIT License
7+
REM Copyright (c) 2020 Pierre Raybaut
8+
REM (see PythonQwt LICENSE file for more details)
9+
REM ======================================================
10+
setlocal enabledelayedexpansion
11+
call %~dp0utils GetScriptPath SCRIPTPATH
12+
cd %SCRIPTPATH%\..
13+
14+
:: Iterate over all directories in the grandparent directory
15+
:: (WinPython base directories)
16+
call %FUNC% GetPythonExeGrandParentDir DIR0
17+
for /D %%d in ("%DIR0%*") do (
18+
set WINPYDIRBASE=%%d
19+
call !WINPYDIRBASE!\scripts\env.bat
20+
echo Upgrading environment for "%%d":
21+
python -m pip install --upgrade pip
22+
python -m pip install --upgrade PythonQwt guidata
23+
echo ----
24+
)
25+
26+
%PYTHON% -m pip list > dev\pip_list.txt
27+
call %FUNC% EndOfScript

0 commit comments

Comments
 (0)