Revert "Fixes related to cache directory argument changes in pip>=6."

This commit is contained in:
Mike Place 2017-03-27 17:17:18 -06:00 committed by GitHub
parent a91bab867e
commit b4753d1a5a
3 changed files with 8 additions and 17 deletions

View file

@ -344,7 +344,6 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
target=None,
download=None,
download_cache=None,
cache_dir=None,
source=None,
upgrade=False,
force_reinstall=False,
@ -441,8 +440,8 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
download
Download packages into ``download`` instead of installing them
download_cache | cache_dir
Cache downloaded packages in ``download_cache`` or ``cache_dir`` dir
download_cache
Cache downloaded packages in ``download_cache`` dir
source
Check out ``editable`` packages into ``source`` dir
@ -679,10 +678,8 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
if download:
cmd.extend(['--download', download])
if download_cache or cache_dir:
cmd.extend(['--cache-dir' if salt.utils.compare_versions(
ver1=version(bin_env), oper='>=', ver2='6.0.0'
) else '--download-cache', download_cache or cache_dir])
if download_cache:
cmd.extend(['--download-cache', download_cache])
if source:
cmd.extend(['--source', source])

View file

@ -237,7 +237,6 @@ def installed(name,
target=None,
download=None,
download_cache=None,
cache_dir=None,
source=None,
upgrade=False,
force_reinstall=False,
@ -337,8 +336,8 @@ def installed(name,
download
Download packages into ``download`` instead of installing them
download_cache | cache_dir
Cache downloaded packages in ``download_cache`` or ``cache_dir`` dir
download_cache
Cache downloaded packages in ``download_cache`` dir
source
Check out ``editable`` packages into ``source`` dir
@ -682,7 +681,6 @@ def installed(name,
target=target,
download=download,
download_cache=download_cache,
cache_dir=cache_dir,
source=source,
upgrade=upgrade,
force_reinstall=force_reinstall,

View file

@ -47,7 +47,6 @@ def managed(name,
no_deps=False,
pip_download=None,
pip_download_cache=None,
pip_cache_dir=None,
pip_exists_action=None,
pip_ignore_installed=False,
proxy=None,
@ -55,8 +54,7 @@ def managed(name,
env_vars=None,
no_use_wheel=False,
pip_upgrade=False,
pip_pkgs=None,
pip_no_cache_dir=False):
pip_pkgs=None):
'''
Create a virtualenv and optionally manage it with pip
@ -272,7 +270,6 @@ def managed(name,
extra_index_url=extra_index_url,
download=pip_download,
download_cache=pip_download_cache,
cache_dir=pip_cache_dir,
no_chown=no_chown,
pre_releases=pre_releases,
exists_action=pip_exists_action,
@ -281,8 +278,7 @@ def managed(name,
no_deps=no_deps,
proxy=proxy,
use_vt=use_vt,
env_vars=env_vars,
no_cache_dir=pip_no_cache_dir
env_vars=env_vars
)
ret['result'] &= _ret['retcode'] == 0
if _ret['retcode'] > 0: