Try adding the existence check before reinstalling
This commit is contained in:
@@ -232,8 +232,8 @@ def setup_python(
|
||||
sys.exit(1)
|
||||
|
||||
# ensure pip is installed
|
||||
if not (installation_bin_path / "pip").exists():
|
||||
call(["python", "-m", "ensurepip"], env=env, cwd="/tmp")
|
||||
# ensure we have the version that matches our constraints
|
||||
# use "--force-reinstall" ensures that it's installed as 'pip'
|
||||
call(
|
||||
[
|
||||
@@ -248,6 +248,14 @@ def setup_python(
|
||||
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)
|
||||
|
||||
@@ -176,8 +176,8 @@ def setup_python(
|
||||
log.step("Installing build tools...")
|
||||
|
||||
# ensure pip is installed
|
||||
if not (installation_path / "Scripts" / "pip.exe").exists():
|
||||
call(["python", "-m", "ensurepip"], env=env, cwd="C:\\cibw")
|
||||
# ensure we have the version that matches our constraints
|
||||
# use "--force-reinstall" ensures that it's installed as 'pip.exe'
|
||||
call(
|
||||
[
|
||||
@@ -192,6 +192,12 @@ def setup_python(
|
||||
env=env,
|
||||
)
|
||||
|
||||
# ensure we have the version that matches our constraints
|
||||
call(
|
||||
["python", "-m", "pip", "install", "--upgrade", "pip", *dependency_constraint_flags],
|
||||
env=env,
|
||||
)
|
||||
|
||||
assert (installation_path / "Scripts" / "pip.exe").exists()
|
||||
where_pip = (
|
||||
subprocess.run(
|
||||
|
||||
Reference in New Issue
Block a user