diff --git a/rattail_fabric/python.py b/rattail_fabric/python.py index 7c07ad6..20e6cb4 100644 --- a/rattail_fabric/python.py +++ b/rattail_fabric/python.py @@ -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))