Skip to content

Commit

Permalink
make sure pip exists in manylinux installation when dynamically downl…
Browse files Browse the repository at this point in the history
…oading python
  • Loading branch information
timfel committed Jul 1, 2023
1 parent b9a84f6 commit c5abafb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cibuildwheel/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ def install_python(container: OCIContainer, config: PythonConfiguration) -> bool
# name is inconsistent with the archive name
call("tar", "-C", installation_path, "--strip-components=1", "-xzf", downloaded_archive)
downloaded_archive.unlink()
# make sure pip and wheel are available
bin_path = installation_path / "bin"
call(bin_path / "python", "-s", "-m", "ensurepip")
if not (bin_path / "pip").exists():
call("cp", bin_path / "pip3", bin_path / "pip")
call(bin_path / "python", "-s", "-m", "pip", "install", "wheel")
container.copy_into(installation_path, config.path)
try:
container.call(["test", "-x", config.path / "bin" / "python"])
Expand Down

0 comments on commit c5abafb

Please sign in to comment.