Skip to content

Commit

Permalink
Fix build artifact collection
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Oct 15, 2024
1 parent a45fa6c commit 94e5fab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cpython-windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ def collect_python_build_artifacts(
arch: str,
config: str,
openssl_entry: str,
freethreaded: bool,
):
"""Collect build artifacts from Python.
Expand Down Expand Up @@ -1266,13 +1267,18 @@ def find_additional_dependencies(project: pathlib.Path):

exts = ("lib", "exp")

if freethreaded:
lib_suffix = "t"
else:
lib_suffix = ""

for ext in exts:
source = outputs_path / ("python%s.%s" % (python_majmin, ext))
dest = core_dir / ("python%s.%s" % (python_majmin, ext))
source = outputs_path / ("python%s%s.%s" % (python_majmin, lib_suffix, ext))
dest = core_dir / ("python%s%s.%s" % (python_majmin, lib_suffix, ext))
log("copying %s" % source)
shutil.copyfile(source, dest)

res["core"]["shared_lib"] = "install/python%s.dll" % python_majmin
res["core"]["shared_lib"] = "install/python%s%s.dll" % (python_majmin, lib_suffix)

# We hack up pythoncore.vcxproj and the list in it when this function
# runs isn't totally accurate. We hardcode the list from the CPython
Expand Down Expand Up @@ -1708,6 +1714,7 @@ def build_cpython(
build_directory,
artifact_config,
openssl_entry=openssl_entry,
freethreaded=freethreaded,
)

for ext, init_fn in sorted(builtin_extensions.items()):
Expand Down Expand Up @@ -1792,7 +1799,7 @@ def build_cpython(
}

# Collect information from running Python script.
python_exe = out_dir / "python" / "install" / "python.exe"
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
1 change: 1 addition & 0 deletions src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const PE_ALLOWED_LIBRARIES: &[&str] = &[
"python311.dll",
"python312.dll",
"python313.dll",
"python313t.dll",
"sqlite3.dll",
"tcl86t.dll",
"tk86t.dll",
Expand Down

0 comments on commit 94e5fab

Please sign in to comment.