File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1759,6 +1759,15 @@ def build_cpython(
17591759 log ("copying %s to %s" % (source , dest ))
17601760 shutil .copyfile (source , dest )
17611761
1762+ # Rename to `python.exe` when an alternative executable is built, e.g., when
1763+ # free-threading is enabled the name is `python3.13t.exe`.
1764+ canonical_python_exe = install_dir / "python.exe"
1765+ if not canonical_python_exe .exists ():
1766+ os .rename (
1767+ python_exe ,
1768+ canonical_python_exe ,
1769+ )
1770+
17621771 # CPython 3.13 removed `run_tests.py`, we provide a compatibility script
17631772 # for now.
17641773 if meets_python_minimum_version (python_version , "3.13" ):
@@ -1811,13 +1820,12 @@ 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" )
18181826 subprocess .run (
18191827 [
1820- str (python_exe ),
1828+ str (canonical_python_exe ),
18211829 str (SUPPORT / "generate_metadata.py" ),
18221830 str (metadata_path ),
18231831 ],
You can’t perform that action at this time.
0 commit comments