Skip to content

Commit

Permalink
Include python.exe copy of python3.13t.exe in Windows free-thread…
Browse files Browse the repository at this point in the history
…ed distributions
  • Loading branch information
zanieb committed Oct 17, 2024
1 parent 9780ebb commit 5d1573c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cpython-windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,15 @@ def build_cpython(
os.environ,
)

# Create a `python.exe` when using an alternative name, e.g., when
# freethreading is enabled the name is `python3.13t.exe`.
canonical_python_exe = install_dir / "python.exe"
if canonical_python_exe.exists():
shutil.copyfile(
python_exe,
canonical_python_exe,
)

# We install pip by using pip to install itself. This leverages a feature
# where Python can automatically recognize wheel/zip files on sys.path and
# import their contents. According to
Expand Down Expand Up @@ -1811,7 +1820,6 @@ def build_cpython(
}

# Collect information from running Python script.
python_exe = out_dir / "python" / "install" / python_exe
metadata_path = td / "metadata.json"
env = dict(os.environ)
env["ROOT"] = str(out_dir / "python")
Expand Down

0 comments on commit 5d1573c

Please sign in to comment.