(pyversion)
Change make_virtualenv to use a given cmd

    pyversion should be '2' or '3'
Change make_virtualenv to use a given cmd
Change make_virtualenv to use a given cmd
def use_venv(pyversion):
    """
    Change make_virtualenv to use a given cmd

    pyversion should be '2' or '3'
    """
    pyversion = str(pyversion)
    if pyversion == '2':
        yield
    elif pyversion == '3':
        oldvenv = env.virtualenv
        env.virtualenv = 'virtualenv -p /usr/bin/python3'
        yield
        env.virtualenv = oldvenv
    else:
        raise ValueError("pyversion must be one of '2' or '3', not %s" % pyversion)
def use_venv ( pyversion ) : pyversion = str ( pyversion ) if pyversion == '2' : yield elif pyversion == '3' : oldvenv = env . virtualenv env . virtualenv = 'virtualenv -p /usr/bin/python3' yield env . virtualenv = oldvenv else : raise ValueError ( "pyversion must be one of '2' or '3', not %s" % pyversion )