Skip to content

Commit abdb71f

Browse files
committed
fix python bin handling
1 parent a480e7d commit abdb71f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ buildvariants:
308308
run_on:
309309
- macos-14
310310
expansions:
311-
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t
311+
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13t/bin/python3t
312312
tags: []
313313
- name: free-threaded-macos-arm64-python3.13t
314314
tasks:
@@ -317,7 +317,7 @@ buildvariants:
317317
run_on:
318318
- macos-14-arm64
319319
expansions:
320-
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t
320+
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13t/bin/python3t
321321
tags: []
322322
- name: free-threaded-win64-python3.14t
323323
tasks:
@@ -326,7 +326,7 @@ buildvariants:
326326
run_on:
327327
- windows-64-vsMulti-small
328328
expansions:
329-
PYTHON_BINARY: C:/python/Python314t/python.exe
329+
PYTHON_BINARY: C:/python/Python314t/python3.14t.exe
330330
tags: []
331331

332332
# Green framework tests

.evergreen/scripts/generate_config_utils.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,15 @@ def get_python_binary(python: str, host: Host) -> str:
153153
base = "C:/python/32"
154154
else:
155155
base = "C:/python"
156-
python = python.replace(".", "")
157-
if python == "313t":
158-
return f"{base}/Python313/python3.13t.exe"
159-
return f"{base}/Python{python}/python.exe"
156+
python_dir = python.replace(".", "")
157+
return f"{base}/Python{python_dir}/python{python}.exe"
160158

161159
if name in ["rhel8", "ubuntu22", "ubuntu20", "rhel7"]:
162160
return f"/opt/python/{python}/bin/python3"
163161

164162
if name in ["macos", "macos-arm64"]:
165-
if python == "3.13t":
166-
return "/Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t"
167-
return f"/Library/Frameworks/Python.Framework/Versions/{python}/bin/python3"
163+
bin_name = "python3t" if "t" in python else "python3"
164+
return f"/Library/Frameworks/Python.Framework/Versions/{python}/bin/{bin_name}"
168165

169166
raise ValueError(f"no match found for python {python} on {name}")
170167

0 commit comments

Comments
 (0)