mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Use pip.__main__ to invoke pip on Python 2.6
This commit is contained in:
parent
b170957301
commit
ea108f834b
1 changed files with 6 additions and 1 deletions
|
@ -739,7 +739,12 @@ class WheelBuilder(object):
|
|||
urls = [self.finder.find_requirement(InstallRequirement.from_line(r),
|
||||
upgrade=False).url
|
||||
for r in reqs]
|
||||
args = [sys.executable, '-m', 'pip', 'install', '--prefix', prefix] \
|
||||
|
||||
if sys.version_info >= (2, 7):
|
||||
mpip = 'pip'
|
||||
else:
|
||||
mpip = 'pip.__main__' # Python 2.6 can't execute a package with -m
|
||||
args = [sys.executable, '-m', mpip, 'install', '--prefix', prefix] \
|
||||
+ list(urls)
|
||||
with open_spinner("Installing build dependencies") as spinner:
|
||||
call_subprocess(args, show_stdout=False, spinner=spinner)
|
||||
|
|
Loading…
Reference in a new issue