Skip to content

Commit b1b070c

Browse files
committed
fix handling of free-threaded python on windows
1 parent de5f785 commit b1b070c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.evergreen/scripts/setup-uv-python.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ if [ -z "${UV_PYTHON:-}" ]; then
3737
_python=$(echo "$_python" | sed 's/t//g')
3838
_python="/Library/Frameworks/$framework_dir.Framework/Versions/$_python/bin/$binary_name"
3939
elif [ "Windows_NT" = "${OS:-}" ]; then
40-
_python=$(echo $_python | cut -d. -f1,2 | sed 's/\.//g')
40+
_python=$(echo $_python | cut -d. -f1,2 | sed 's/\.//g; s/t//g')
41+
if [[ "$_python" == *"t"* ]]; then
42+
_exe="python${PYTHON_VERSION}t.exe"
43+
else
44+
_exe="python.exe"
45+
fi
4146
if [ -n "${IS_WIN32:-}" ]; then
42-
_python="C:/python/32/Python$_python/python.exe"
47+
_python="C:/python/32/Python${_python}/${_exe}"
4348
else
44-
_python="C:/python/Python$_python/python.exe"
49+
_python="C:/python/Python${_python}/${_exe}"
4550
fi
4651
elif [ -d "/opt/python/$_python/bin" ]; then
4752
_python="/opt/python/$_python/bin/python3"

0 commit comments

Comments
 (0)