Skip to content

Commit 77d1b58

Browse files
committed
build: ensure non-gil wheels are not made for free threaded
1 parent f183923 commit 77d1b58

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

Jenkinsfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def installMSVCRuntime(cacheLocation){
7171
powershell(label: 'Install VC Runtime', script: 'Start-Process -filepath "$Env:CACHED_FILE" -ArgumentList "/install", "/passive", "/norestart" -Passthru | Wait-Process;')
7272
}
7373
}
74-
def SUPPORTED_MAC_VERSIONS = ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
75-
def SUPPORTED_LINUX_VERSIONS = ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
76-
def SUPPORTED_WINDOWS_VERSIONS = ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
74+
def SUPPORTED_MAC_VERSIONS = ['3.10', '3.11', '3.12', '3.13', '3.14+gil', '3.14t']
75+
def SUPPORTED_LINUX_VERSIONS = ['3.10', '3.11', '3.12', '3.13', '3.14+gil', '3.14t']
76+
def SUPPORTED_WINDOWS_VERSIONS = ['3.10', '3.11', '3.12', '3.13', '3.14+gil', '3.14t']
7777
// ============================================================================
7878
// Dynamic variables. Used to help manage state
7979
def wheelStashes = []
@@ -178,7 +178,7 @@ def windows_wheels(pythonVersions, testPackages, params, wheelStashes){
178178
bat(label: 'Running Tox',
179179
script: """python -m venv venv
180180
venv\\Scripts\\pip install --disable-pip-version-check uv
181-
venv\\Scripts\\uv run --only-group tox --python ${pythonVersion} --with tox-uv tox run -e py${pythonVersion.replace('.', '')} --installpkg ${it.path}
181+
venv\\Scripts\\uv run --only-group tox --python ${pythonVersion} --with tox-uv tox run -e py${pythonVersion.replace('.', '').replace('+gil', '')} --installpkg ${it.path}
182182
rmdir /S /Q venv
183183
rmdir /S /Q .tox
184184
"""
@@ -255,7 +255,7 @@ def linux_wheels(pythonVersions, testPackages, params, wheelStashes){
255255
'UV_PYTHON_INSTALL_DIR=/tmp/uvpython',
256256
'UV_CACHE_DIR=/tmp/uvcache',
257257
"TOX_INSTALL_PKG=${findFiles(glob:'dist/*.whl')[0].path}",
258-
"TOX_ENV=py${pythonVersion.replace('.', '')}",
258+
"TOX_ENV=py${pythonVersion.replace('.', '').replace('+gil','')}",
259259
'UV_INDEX_STRATEGY=unsafe-best-match',
260260
"UV_CONFIG_FILE=${createUVConfig()}"
261261
]){
@@ -316,7 +316,7 @@ def mac_wheels(pythonVersions, testPackages, params, wheelStashes){
316316
stage(newWheelStage){
317317
if(selectedArches.contains(arch)){
318318
stage("Build Wheel (${pythonVersion} MacOS ${arch})"){
319-
node("mac && python${pythonVersion} && ${arch}"){
319+
node("mac && python3 && ${arch}"){
320320
timeout(60){
321321
checkout scm
322322
try{
@@ -352,9 +352,9 @@ def mac_wheels(pythonVersions, testPackages, params, wheelStashes){
352352
withEnv(["UV_CONFIG_FILE=${createUVConfig()}"]){
353353
timeout(60){
354354
sh(label: 'Running Tox',
355-
script: """python${pythonVersion} -m venv venv
355+
script: """python3 -m venv venv
356356
./venv/bin/python -m pip install --disable-pip-version-check uv
357-
./venv/bin/uv run --only-group tox --with tox-uv tox run --installpkg ${it.path} -e py${pythonVersion.replace('.', '')}"""
357+
./venv/bin/uv run --only-group tox --with tox-uv tox run --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')}"""
358358
)
359359
}
360360
}
@@ -400,7 +400,7 @@ def mac_wheels(pythonVersions, testPackages, params, wheelStashes){
400400
)
401401
def fusedWheel = findFiles(excludes: '', glob: 'out/*.whl')[0]
402402
def props = readTOML( file: 'pyproject.toml')['project']
403-
def universalWheel = "py3exiv2bind-${props.version}-cp${pythonVersion.replace('.','')}-cp${pythonVersion.replace('.','')}-macosx_11_0_universal2.whl"
403+
def universalWheel = "py3exiv2bind-${props.version}-cp${pythonVersion.replace('.', '').replace('+git', '')}-cp${pythonVersion.replace('.','').replace('+gil', '')}-macosx_11_0_universal2.whl"
404404
sh "mv ${fusedWheel.path} ./dist/${universalWheel}"
405405
stash includes: 'dist/*.whl', name: "python${pythonVersion} mac-universal2 wheel"
406406
wheelStashes << "python${pythonVersion} mac-universal2 wheel"
@@ -429,11 +429,11 @@ def mac_wheels(pythonVersions, testPackages, params, wheelStashes){
429429
unstash "python${pythonVersion} mac-universal2 wheel"
430430
findFiles(glob: 'dist/*.whl').each{
431431
sh(label: 'Running Tox',
432-
script: """python${pythonVersion} -m venv venv
432+
script: """python3 -m venv venv
433433
trap "rm -rf venv" EXIT
434434
./venv/bin/python -m pip install --disable-pip-version-check uv
435435
trap "rm -rf venv && rm -rf .tox" EXIT
436-
./venv/bin/uv run --only-group tox --python=${pythonVersion} --with tox-uv tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')}
436+
./venv/bin/uv run --only-group tox --python=${pythonVersion} --with tox-uv tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')}
437437
"""
438438
)
439439
}
@@ -1206,7 +1206,7 @@ pipeline {
12061206
trap "rm -rf venv" EXIT
12071207
./venv/bin/python -m pip install --disable-pip-version-check uv
12081208
trap "rm -rf venv && rm -rf .tox" EXIT
1209-
./venv/bin/uv run --only-group tox --python=${pythonVersion} --with tox-uv tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')}
1209+
./venv/bin/uv run --only-group tox --python=${pythonVersion} --with tox-uv tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')}
12101210
"""
12111211
)
12121212
}
@@ -1266,7 +1266,7 @@ pipeline {
12661266
timeout(60){
12671267
try{
12681268
bat(label: 'Running Tox',
1269-
script: """uv run --only-group tox --with tox-uv tox run --runner=uv-venv-runner --installpkg ${it.path} -e py${pythonVersion.replace('.', '')} -vv
1269+
script: """uv run --only-group tox --with tox-uv tox run --runner=uv-venv-runner --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')} -vv
12701270
rmdir /S /Q .tox
12711271
"""
12721272
)
@@ -1341,7 +1341,7 @@ pipeline {
13411341
timeout(60){
13421342
sh(label: 'Running Tox',
13431343
script: """trap "rm -rf .tox" EXIT
1344-
uv run --only-group tox --python=${pythonVersion} --python-preference only-system --with tox-uv tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')}
1344+
uv run --only-group tox --python=${pythonVersion} --python-preference only-system --with tox-uv tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')}
13451345
"""
13461346
)
13471347
}

scripts/build_linux_wheels.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ generate_wheel(){
4949

5050
case $platform in
5151
linux/amd64)
52-
manylinux_image=quay.io/pypa/manylinux_2_28_x86_64
52+
manylinux_image=quay.io/pypa/manylinux_2_28
5353
;;
5454
linux/arm64)
55-
manylinux_image=quay.io/pypa/manylinux_2_28_aarch64
55+
manylinux_image=quay.io/pypa/manylinux_2_28
5656
;;
5757
*)
5858
echo "Unsupported platform: $platform"

scripts/build_mac_wheel.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ generate_wheel(){
2525
uv_exec=$1
2626
project_root=$2
2727
python_version=$3
28-
if [[ $python_version != *t ]]; then
29-
python_version="${python_version}+gil"
30-
fi
3128

3229
# Get the processor type
3330
processor_type=$(uname -m)
@@ -65,10 +62,10 @@ generate_wheel(){
6562
echo ""
6663
echo "================================================================================"
6764
echo "${undelocate_wheel} is linked to the following:"
68-
$uv_path run --only-group package delocate-listdeps --depending "${undelocate_wheel}"
65+
$uv_path run --only-group=package --python=$python_version delocate-listdeps --depending "${undelocate_wheel}"
6966
echo ""
7067
echo "================================================================================"
71-
$uv_path run --only-group package delocate-wheel -w $output_path --require-archs $REQUIRED_ARCH --verbose "$undelocate_wheel"
68+
$uv_path run --only-group=package --python=$python_version delocate-wheel -w $output_path --require-archs $REQUIRED_ARCH --verbose "$undelocate_wheel"
7269
}
7370

7471

0 commit comments

Comments
 (0)