Skip to content

Commit 7215284

Browse files
committed
unix: copy PYTHON.json properly when not using Docker
1 parent 700d715 commit 7215284

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cpython-unix/build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,12 @@ def build_cpython(
623623
json.dump(python_info, fh, sort_keys=True, indent=4)
624624
fh.flush()
625625

626-
build_env.copy_file(fh.name, "/build/out/python", dest_name="PYTHON.json")
626+
if image:
627+
dest_path = "/build/out/python"
628+
else:
629+
dest_path = "out/python"
630+
631+
build_env.copy_file(fh.name, dest_path, dest_name="PYTHON.json")
627632

628633
basename = "cpython-%s-%s" % (entry["version"], platform)
629634

pythonbuild/buildenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self, td):
9797

9898
def copy_file(self, source: pathlib.Path, dest_path=None, dest_name=None):
9999
if dest_path:
100-
dest_dir = self.td / dest_path.lstrip("/")
100+
dest_dir = self.td / dest_path
101101
else:
102102
dest_dir = self.td
103103

0 commit comments

Comments
 (0)