Skip to content

Commit 8f425ae

Browse files
committed
make sure pip exists in manylinux installation when dynamically downloading python
1 parent b9a84f6 commit 8f425ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cibuildwheel/linux.py

+6
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ def install_python(container: OCIContainer, config: PythonConfiguration) -> bool
142142
# name is inconsistent with the archive name
143143
call("tar", "-C", installation_path, "--strip-components=1", "-xzf", downloaded_archive)
144144
downloaded_archive.unlink()
145+
# make sure pip exists
146+
bin_path = installation_path / "bin"
147+
if not ((bin_path / "pip").exists() or (bin_path / "pip3").exists()):
148+
call(installation_path / "bin" / "python", "-s", "-m", "ensurepip")
149+
if not (bin_path / "pip").exists():
150+
call("cp", bin_path / "pip3", bin_path / "pip")
145151
container.copy_into(installation_path, config.path)
146152
try:
147153
container.call(["test", "-x", config.path / "bin" / "python"])

0 commit comments

Comments
 (0)