Skip to content

Commit dd68bf1

Browse files
committed
refactor: Windows wheel building logic inside own PowerShell module
1 parent 16d6d1f commit dd68bf1

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def windows_wheels(pythonVersions, testPackages, params, wheelStashes){
131131
retry(3){
132132
checkout scm
133133
timeout(60){
134-
powershell(label: 'Building Wheel for Windows', script: "scripts/build_windows.ps1 -PythonVersion ${pythonVersion} -DockerImageName ${dockerImageName}")
134+
powershell(label: 'Building Wheel for Windows', script: "scripts/build_windows.ps1 -PythonVersion ${pythonVersion.replace('+gil','')} -DockerImageName ${dockerImageName}")
135135
}
136136
try{
137137
stash includes: 'dist/*.whl', name: "python${pythonVersion} windows wheel"

scripts/resources/windows/tox/powershell_modules/python_helpers/python_helpers.psm1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,21 @@ function CreateNewWheel {
2828
[string]$OutputDir
2929

3030
)
31-
uv build --python=$PythonVersion --wheel --out-dir=$OutputDir --config-setting=conan_cache=$CONAN_CACHE_DIR --verbose $SourcePath
31+
$uvArgList = @(
32+
"build",
33+
"--python=$PythonVersion",
34+
"--wheel",
35+
"--out-dir=$OutputDir",
36+
"--config-setting=conan_cache=$CONAN_CACHE_DIR",
37+
"--verbose",
38+
"$SourcePath"
39+
)
40+
$local:uvBuildProcess = Start-Process -FilePath "uv" -ArgumentList $uvArgList -NoNewWindow -PassThru -Wait
41+
if ($local:uvBuildProcess.ExitCode -ne 0)
42+
{
43+
throw "An error creating Wheel for Python version $PythonVersion. Exit code: $($local:uvBuildProcess.ExitCode)"
44+
}
45+
Write-Host "Wheel for Python $PythonVersion created successfully."
3246

3347
}
3448

0 commit comments

Comments
 (0)