@@ -1122,6 +1122,7 @@ def collect_python_build_artifacts(
11221122 arch : str ,
11231123 config : str ,
11241124 openssl_entry : str ,
1125+ freethreaded : bool ,
11251126):
11261127 """Collect build artifacts from Python.
11271128
@@ -1266,13 +1267,18 @@ def find_additional_dependencies(project: pathlib.Path):
12661267
12671268 exts = ("lib" , "exp" )
12681269
1270+ if freethreaded :
1271+ lib_suffix = "t"
1272+ else :
1273+ lib_suffix = ""
1274+
12691275 for ext in exts :
1270- source = outputs_path / ("python%s.%s" % (python_majmin , ext ))
1271- dest = core_dir / ("python%s.%s" % (python_majmin , ext ))
1276+ source = outputs_path / ("python%s%s .%s" % (python_majmin , lib_suffix , ext ))
1277+ dest = core_dir / ("python%s%s .%s" % (python_majmin , lib_suffix , ext ))
12721278 log ("copying %s" % source )
12731279 shutil .copyfile (source , dest )
12741280
1275- res ["core" ]["shared_lib" ] = "install/python%s.dll" % python_majmin
1281+ res ["core" ]["shared_lib" ] = "install/python%s%s .dll" % ( python_majmin , lib_suffix )
12761282
12771283 # We hack up pythoncore.vcxproj and the list in it when this function
12781284 # runs isn't totally accurate. We hardcode the list from the CPython
@@ -1708,6 +1714,7 @@ def build_cpython(
17081714 build_directory ,
17091715 artifact_config ,
17101716 openssl_entry = openssl_entry ,
1717+ freethreaded = freethreaded ,
17111718 )
17121719
17131720 for ext , init_fn in sorted (builtin_extensions .items ()):
@@ -1792,7 +1799,7 @@ def build_cpython(
17921799 }
17931800
17941801 # Collect information from running Python script.
1795- python_exe = out_dir / "python" / "install" / "python.exe"
1802+ python_exe = out_dir / "python" / "install" / python_exe
17961803 metadata_path = td / "metadata.json"
17971804 env = dict (os .environ )
17981805 env ["ROOT" ] = str (out_dir / "python" )
0 commit comments