mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
pip shell migration
This commit is contained in:
parent
0748e70889
commit
7773360b2e
@ -480,7 +480,7 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
|
||||
if pre_releases:
|
||||
# Check the locally installed pip version
|
||||
pip_version_cmd = '{0} --version'.format(_get_pip_bin(bin_env))
|
||||
output = __salt__['cmd.run_all'](pip_version_cmd).get('stdout', '')
|
||||
output = __salt__['cmd.run_all'](pip_version_cmd, python_shell=False).get('stdout', '')
|
||||
pip_version = output.split()[1]
|
||||
|
||||
# From pip v1.4 the --pre flag is available
|
||||
@ -557,7 +557,7 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
|
||||
cmd_kwargs = dict(runas=user, cwd=cwd, saltenv=saltenv)
|
||||
if bin_env and os.path.isdir(bin_env):
|
||||
cmd_kwargs['env'] = {'VIRTUAL_ENV': bin_env}
|
||||
return __salt__['cmd.run_all'](' '.join(cmd), **cmd_kwargs)
|
||||
return __salt__['cmd.run_all'](' '.join(cmd), python_shell=False, **cmd_kwargs)
|
||||
finally:
|
||||
for requirement in cleanup_requirements:
|
||||
try:
|
||||
@ -729,7 +729,7 @@ def uninstall(pkgs=None,
|
||||
pass
|
||||
cmd.extend(pkgs)
|
||||
|
||||
cmd_kwargs = dict(runas=user, cwd=cwd, saltenv=saltenv)
|
||||
cmd_kwargs = dict(python_shell=False, runas=user, cwd=cwd, saltenv=saltenv)
|
||||
if bin_env and os.path.isdir(bin_env):
|
||||
cmd_kwargs['env'] = {'VIRTUAL_ENV': bin_env}
|
||||
|
||||
@ -793,7 +793,7 @@ def freeze(bin_env=None,
|
||||
user = str(runas)
|
||||
|
||||
cmd = [_get_pip_bin(bin_env), 'freeze']
|
||||
cmd_kwargs = dict(runas=user, cwd=cwd)
|
||||
cmd_kwargs = dict(runas=user, cwd=cwd, python_shell=False)
|
||||
if bin_env and os.path.isdir(bin_env):
|
||||
cmd_kwargs['env'] = {'VIRTUAL_ENV': bin_env}
|
||||
result = __salt__['cmd.run_all'](' '.join(cmd), **cmd_kwargs)
|
||||
@ -844,7 +844,7 @@ def list_(prefix=None,
|
||||
elif runas is not None and not user:
|
||||
user = str(runas)
|
||||
|
||||
cmd_kwargs = dict(runas=user, cwd=cwd)
|
||||
cmd_kwargs = dict(runas=user, cwd=cwd, python_shell=False)
|
||||
if bin_env and os.path.isdir(bin_env):
|
||||
cmd_kwargs['env'] = {'VIRTUAL_ENV': bin_env}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user