Fixed pip.install for windows

This commit is contained in:
twangboy 2015-04-01 11:48:03 -06:00
parent 3001b727ef
commit 3792ea1d10
2 changed files with 12 additions and 4 deletions

View File

@ -361,7 +361,10 @@ def _run(cmd,
)
if python_shell is not True and not isinstance(cmd, list):
cmd = shlex.split(cmd)
posix = True
if salt.utils.is_windows():
posix = False
cmd = shlex.split(cmd, posix=posix)
if not use_vt:
# This is where the magic happens
try:

View File

@ -504,9 +504,14 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
# they would survive the previous line (in the pip.installed state).
# Put the commas back in while making sure the names are contained in
# quotes, this allows for proper version spec passing salt>=0.17.0
cmd.extend(
['{0!r}'.format(p.replace(';', ',')) for p in pkgs]
)
if salt.utils.is_windows():
cmd.extend(
['{0}'.format(p.replace(';', ',')) for p in pkgs]
)
else:
cmd.extend(
['{0!r}'.format(p.replace(';', ',')) for p in pkgs]
)
if editable:
egg_match = re.compile(r'(?:#|#.*?&)egg=([^&]*)')