def _install_ebcli()

in scripts/ebcli_installer.py [0:0]


def _install_ebcli(quiet, version, ebcli_source):
    """
    Function installs the awsebcli presumably within the virtualenv,
    ".ebcli-virtual-env", created and activated by this script apriori.
    If `version` is passed, the specific version of the EBCLI is installed.

    The presence of `version` and `ebcli_source` will lead to an exception
    as they represent two different ways of installing the EBCLI.

    :param quiet: whether to display the output of awsebcli installation to
                  the terminal or not
    :param version: the specific version of awsebcli to install
    :return None
    """
    if ebcli_source:
        install_args = ['pip', 'install', '{}'.format(ebcli_source.strip())]
    elif version:
        install_args = ['pip', 'install', 'awsebcli=={}'.format(version.strip())]
    else:
        install_args = [
            'pip', 'install', 'awsebcli',
            '--upgrade',
            '--upgrade-strategy', 'eager',
        ]
    returncode = _exec_cmd(install_args, quiet)

    if returncode != 0:
        exit(returncode)