bpo-38927: Use python -m pip to upgrade venv deps (GH-17403)

I suggest you add `bpo-NNNNN: ` as a prefix for the first commit for future PRs. Thanks!
This commit is contained in:
Tzu-ping Chung 2019-11-28 04:25:23 +08:00 committed by Vinay Sajip
parent 045d4e243d
commit d9aa216d49
3 changed files with 9 additions and 6 deletions

View file

@ -393,10 +393,10 @@ class EnvBuilder:
f'Upgrading {CORE_VENV_DEPS} packages in {context.bin_path}'
)
if sys.platform == 'win32':
pip_exe = os.path.join(context.bin_path, 'pip.exe')
python_exe = os.path.join(context.bin_path, 'python.exe')
else:
pip_exe = os.path.join(context.bin_path, 'pip')
cmd = [pip_exe, 'install', '-U']
python_exe = os.path.join(context.bin_path, 'python')
cmd = [python_exe, '-m', 'pip', 'install', '--upgrade']
cmd.extend(CORE_VENV_DEPS)
subprocess.check_call(cmd)