Let caller avoid "eager" strategy when installing pip

actually this pertains to the install of its dependencies
This commit is contained in:
Lance Edgar 2018-11-18 13:34:52 -06:00
parent e3b635b760
commit 36493885e7

View file

@ -37,7 +37,7 @@ from fabric.contrib.files import exists, append
from rattail_fabric import apt, mkdir
def install_pip(use_apt=False):
def install_pip(use_apt=False, eager=True):
"""
Install/upgrade the Pip installer for Python.
"""
@ -53,7 +53,10 @@ def install_pip(use_apt=False):
sudo('apt-get --assume-yes purge python-setuptools')
pip('setuptools')
pip('pip', upgrade=True)
pip('setuptools', 'wheel', 'ndg-httpsclient', upgrade=True, upgrade_strategy='eager')
kwargs = {}
if eager:
kwargs['upgrade_strategy'] = 'eager'
pip('setuptools', 'wheel', 'ndg-httpsclient', upgrade=True, **kwargs)
def pip(*packages, **kwargs):