@@ -1122,6 +1122,7 @@ def collect_python_build_artifacts(
1122
1122
arch : str ,
1123
1123
config : str ,
1124
1124
openssl_entry : str ,
1125
+ freethreaded : bool ,
1125
1126
):
1126
1127
"""Collect build artifacts from Python.
1127
1128
@@ -1266,13 +1267,18 @@ def find_additional_dependencies(project: pathlib.Path):
1266
1267
1267
1268
exts = ("lib" , "exp" )
1268
1269
1270
+ if freethreaded :
1271
+ lib_suffix = "t"
1272
+ else :
1273
+ lib_suffix = ""
1274
+
1269
1275
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 ))
1272
1278
log ("copying %s" % source )
1273
1279
shutil .copyfile (source , dest )
1274
1280
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 )
1276
1282
1277
1283
# We hack up pythoncore.vcxproj and the list in it when this function
1278
1284
# runs isn't totally accurate. We hardcode the list from the CPython
@@ -1708,6 +1714,7 @@ def build_cpython(
1708
1714
build_directory ,
1709
1715
artifact_config ,
1710
1716
openssl_entry = openssl_entry ,
1717
+ freethreaded = freethreaded ,
1711
1718
)
1712
1719
1713
1720
for ext , init_fn in sorted (builtin_extensions .items ()):
@@ -1792,7 +1799,7 @@ def build_cpython(
1792
1799
}
1793
1800
1794
1801
# Collect information from running Python script.
1795
- python_exe = out_dir / "python" / "install" / "python.exe"
1802
+ python_exe = out_dir / "python" / "install" / python_exe
1796
1803
metadata_path = td / "metadata.json"
1797
1804
env = dict (os .environ )
1798
1805
env ["ROOT" ] = str (out_dir / "python" )
0 commit comments