1
1
Fork 0
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:
Thomas Kluyver 2016-12-19 17:46:02 +00:00
parent b170957301
commit ea108f834b

View file

@ -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)