def _install_extensions(ext_paths):
    # clear pre-existing dev extensions
    installed_extensions = [
        x['name'] for x in list_extensions() if x['inst'] == 'Y'
    ]
    remove_extension(installed_extensions)

    # install specified extensions
    for path in ext_paths or []:
        result = pip_cmd('install -e {}'.format(path),
                         "Adding extension '{}'...".format(path))
        if result.error:
            raise result.error  # pylint: disable=raising-bad-type
Exemple #2
0
def _install_extensions(ext_paths):
    # clear pre-existing dev extensions
    try:
        installed_extensions = [x['name'] for x in list_extensions() if x['install'] == 'Y']
        remove_extension(installed_extensions)
    except KeyError as ex:
        logger.warning('Error occurred determining installed extensions. Run with --debug for more info.')
        logger.debug(ex)

    # install specified extensions
    for path in ext_paths or []:
        result = pip_cmd('install -e {}'.format(path), "Adding extension '{}'...".format(path))
        if result.error:
            raise result.error  # pylint: disable=raising-bad-type