Let caller specify pip version when invoking python.mkvirtualenv()
This commit is contained in:
parent
2c5e073168
commit
bf4ac2f676
|
@ -106,9 +106,13 @@ def mkvirtualenv(name, python=None, user=None, workon_home=None, upgrade_pip=Tru
|
|||
workon_home = workon_home or getattr(env, 'python_workon_home', '/srv/envs')
|
||||
sudo('mkvirtualenv {} {}'.format('--python={}'.format(python) if python else '', name))
|
||||
if upgrade_pip:
|
||||
if isinstance(upgrade_pip, six.string_types):
|
||||
pip_req = upgrade_pip
|
||||
else:
|
||||
pip_req = 'pip'
|
||||
with workon(name):
|
||||
pip('six')
|
||||
pip('pip', 'setuptools', 'wheel', 'ndg-httpsclient')
|
||||
pip(pip_req, 'setuptools', 'wheel', 'ndg-httpsclient')
|
||||
if user:
|
||||
with cdvirtualenv(name, workon_home=workon_home):
|
||||
mkdir('app/log', owner='{0}:{0}'.format(user))
|
||||
|
|
Loading…
Reference in a new issue