Skip to content

Commit 4239e72

Browse files
committed
unix: fix Python build artifact path normalization
1 parent 7204739 commit 4239e72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpython-unix/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ def python_build_info(
316316
):
317317
"""Obtain build metadata for the Python distribution."""
318318

319+
log("resolving Python distribution build info")
320+
319321
bi = {"core": {"objs": [], "links": []}, "extensions": {}}
320322

321323
# Object files for the core distribution are found by walking the
@@ -324,7 +326,7 @@ def python_build_info(
324326
modules_objs = set()
325327

326328
for f in build_env.find_output_files("python/build", "*.o"):
327-
rel_path = pathlib.Path(f)
329+
rel_path = pathlib.Path("build") / f
328330

329331
if rel_path.parts[1] in ("Objects", "Parser", "Python"):
330332
core_objs.add(rel_path)
@@ -339,8 +341,6 @@ def python_build_info(
339341
libraries = set()
340342

341343
for f in build_env.find_output_files("python/build/lib", "*.a"):
342-
f = f[len("python/build/lib/") :]
343-
344344
# Strip "lib" prefix and ".a" suffix.
345345
libname = f[3:-2]
346346

0 commit comments

Comments
 (0)