File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,22 @@ REM Licensed under the terms of the MIT License
77REM Copyright (c) 2020 Pierre Raybaut
88REM (see PythonQwt LICENSE file for more details)
99REM ======================================================
10+ setlocal enabledelayedexpansion
1011call %~dp0 utils GetScriptPath SCRIPTPATH
11- call %FUNC% GetLibName LIBNAME
1212call %FUNC% GetModName MODNAME
1313call %FUNC% SetPythonPath
14- call %FUNC% UsePython
14+
1515if exist MANIFEST ( del /q MANIFEST )
16- python setup.py build_ext --inplace
16+ :: Iterate over all directories in the grandparent directory
17+ :: (WinPython base directories)
18+ call %FUNC% GetPythonExeGrandParentDir DIR0
19+ for /D %%d in (" %DIR0% *" ) do (
20+ set WINPYDIRBASE = %%d
21+ call !WINPYDIRBASE! \scripts\env.bat
22+ echo ******************************************************************************
23+ echo Building %MODNAME% from " %%d "
24+ echo ******************************************************************************
25+ python setup.py build_ext --inplace
26+ echo ----
27+ )
1728call %FUNC% EndOfScript
Original file line number Diff line number Diff line change @@ -7,10 +7,19 @@ REM Licensed under the terms of the MIT License
77REM Copyright (c) 2020 Pierre Raybaut
88REM (see PythonQwt LICENSE file for more details)
99REM ======================================================
10- setlocal
10+ setlocal enabledelayedexpansion
1111call %~dp0 utils GetScriptPath SCRIPTPATH
1212call %FUNC% GetModName MODNAME
1313call %FUNC% SetPythonPath
14- call %FUNC% UsePython
15- pytest --unattended %MODNAME%
14+
15+ :: Iterate over all directories in the grandparent directory
16+ :: (WinPython base directories)
17+ call %FUNC% GetPythonExeGrandParentDir DIR0
18+ for /D %%d in (" %DIR0% *" ) do (
19+ set WINPYDIRBASE = %%d
20+ call !WINPYDIRBASE! \scripts\env.bat
21+ echo Running pytest from " %%d " :
22+ pytest --ff -q --unattended %MODNAME%
23+ echo ----
24+ )
1625call %FUNC% EndOfScript
Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ REM ======================================================
5959 set PYTHONPATH = %PYTHONPATH% ;%ORIGINAL_PYTHONPATH%
6060 goto :eof
6161
62+ :GetPythonExeGrandParentDir
63+ for %%i in (%PYTHON% ) do set DIR2 = %%~dpi
64+ set DIR2 = %DIR2:~0 ,-1 %
65+ for %%j in (%DIR2% ) do set DIR1 = %%~dpj
66+ set DIR1 = %DIR1:~0 ,-1 %
67+ for %%k in (%DIR1% ) do set %1 =%%~dpk
68+ goto :eof
69+
6270:UsePython
6371 if defined WINPYVER (goto:eof)
6472 if not defined PYTHON (goto :nopython)
You can’t perform that action at this time.
0 commit comments