Remove get-pip and use ensurepip instead

This commit is contained in:
Joe Rickerby
2021-05-08 17:55:10 +01:00
parent c09befbf1b
commit 62672c8101
4 changed files with 13 additions and 22328 deletions
+12 -3
View File
@@ -19,7 +19,6 @@ from .util import (
NonPlatformWheelError,
download,
get_build_verbosity_extra_flags,
get_pip_script,
install_certifi_script,
prepare_command,
read_python_configs,
@@ -232,8 +231,18 @@ def setup_python(
)
sys.exit(1)
# install pip & wheel
call(["python", get_pip_script, *dependency_constraint_flags], env=env, cwd="/tmp")
# install pip
call(
["python", "-m", "ensurepip", "--default-pip"],
env=env,
cwd="/tmp",
)
# ensure we have the version that matches our constraints
call(
["python", "-m", "pip", "install", "--upgrade", "pip", *dependency_constraint_flags],
env=env,
cwd="/tmp",
)
assert (installation_bin_path / "pip").exists()
call(["which", "pip"], env=env)
call(["pip", "--version"], env=env)
File diff suppressed because it is too large Load Diff
-1
View File
@@ -24,7 +24,6 @@ from .typing import PathOrStr, PlatformName
resources_dir = Path(__file__).parent / "resources"
get_pip_script = resources_dir / "get-pip.py"
install_certifi_script = resources_dir / "install_certifi.py"
+1 -2
View File
@@ -17,7 +17,6 @@ from .util import (
NonPlatformWheelError,
download,
get_build_verbosity_extra_flags,
get_pip_script,
prepare_command,
read_python_configs,
)
@@ -176,7 +175,7 @@ def setup_python(
# make sure pip is installed
if not (installation_path / "Scripts" / "pip.exe").exists():
call(["python", get_pip_script, *dependency_constraint_flags], env=env, cwd="C:\\cibw")
call(["python", "-m", "ensurepip", "--default-pip"], env=env, cwd="C:\\cibw")
assert (installation_path / "Scripts" / "pip.exe").exists()
where_pip = (
subprocess.run(