Remove get-pip and use ensurepip instead
This commit is contained in:
+12
-3
@@ -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
@@ -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"
|
||||
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user