Skip to content

Commit 5d1573c

Browse files
committed
Include python.exe copy of python3.13t.exe in Windows free-threaded distributions
1 parent 9780ebb commit 5d1573c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cpython-windows/build.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,15 @@ def build_cpython(
16621662
os.environ,
16631663
)
16641664

1665+
# Create a `python.exe` when using an alternative name, e.g., when
1666+
# freethreading is enabled the name is `python3.13t.exe`.
1667+
canonical_python_exe = install_dir / "python.exe"
1668+
if canonical_python_exe.exists():
1669+
shutil.copyfile(
1670+
python_exe,
1671+
canonical_python_exe,
1672+
)
1673+
16651674
# We install pip by using pip to install itself. This leverages a feature
16661675
# where Python can automatically recognize wheel/zip files on sys.path and
16671676
# import their contents. According to
@@ -1811,7 +1820,6 @@ def build_cpython(
18111820
}
18121821

18131822
# Collect information from running Python script.
1814-
python_exe = out_dir / "python" / "install" / python_exe
18151823
metadata_path = td / "metadata.json"
18161824
env = dict(os.environ)
18171825
env["ROOT"] = str(out_dir / "python")

0 commit comments

Comments
 (0)