Skip to content

Commit 53640e8

Browse files
committed
Task/.bat: build all Py3.8-3.12 wheels at once
1 parent 7ebc054 commit 53640e8

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,39 @@
262262
"Clean Up",
263263
]
264264
},
265+
{
266+
"label": "Build all wheels",
267+
"type": "shell",
268+
"command": "cmd",
269+
"options": {
270+
"cwd": "scripts",
271+
"env": {
272+
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
273+
"UNATTENDED": "1",
274+
}
275+
},
276+
"args": [
277+
"/c",
278+
"build_wheels.bat"
279+
],
280+
"problemMatcher": [],
281+
"group": {
282+
"kind": "build",
283+
"isDefault": true
284+
},
285+
"presentation": {
286+
"echo": true,
287+
"reveal": "always",
288+
"focus": false,
289+
"panel": "shared",
290+
"showReuseMessage": true,
291+
"clear": true
292+
},
293+
"dependsOrder": "sequence",
294+
"dependsOn": [
295+
"Clean Up",
296+
]
297+
},
265298
{
266299
"label": "Build extensions in place",
267300
"type": "shell",

scripts/build_wheels.bat

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@echo off
2+
REM This script was copied from PythonQwt project
3+
REM ======================================================
4+
REM Package build script
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+
call %FUNC% GetModName MODNAME
13+
call %FUNC% SetPythonPath
14+
15+
if exist MANIFEST ( del /q MANIFEST )
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+
:: Get the directory name without the path
21+
for %%n in (%%d) do set "DIRNAME=%%~nxn"
22+
23+
:: Check if the directory ends with "-PyQt6" or "-PySide6"
24+
if not "!DIRNAME:~-6!"=="-PyQt6" (
25+
if not "!DIRNAME:~-8!"=="-PySide6" (
26+
set WINPYDIRBASE=%%d
27+
set OLD_PATH=!PATH!
28+
call !WINPYDIRBASE!\scripts\env.bat
29+
echo ******************************************************************************
30+
echo Building %MODNAME% from "%%d"
31+
echo ******************************************************************************
32+
python setup.py build bdist_wheel
33+
echo ----
34+
set PATH=!OLD_PATH!
35+
)
36+
)
37+
)
38+
call %FUNC% EndOfScript

0 commit comments

Comments
 (0)