Skip to content

Commit fd507d1

Browse files
jcfrthewtex
authored andcommitted
windows_build_wheels: By default, run pip with --upgrade flag
1 parent 7522821 commit fd507d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/windows_build_wheels.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@
2222
from wheel_builder_utils import push_dir, push_env
2323

2424

25-
def pip_install(python_dir, package):
25+
def pip_install(python_dir, package, upgrade=True):
2626
pip = os.path.join(python_dir, "Scripts", "pip.exe")
2727
print("Installing %s using %s" % (package, pip))
28-
check_call([pip, "install", package])
28+
args = [pip, "install"]
29+
if upgrade:
30+
args.append("--upgrade")
31+
args.append(package)
32+
check_call(args)
2933

3034

3135
def prepare_build_env(python_version):

0 commit comments

Comments
 (0)