(plugin_manager)
Run installer hooks defined in plugins
Run installer hooks defined in plugins
Run installer hooks defined in plugins
def run_plugin_actions(plugin_manager):
    """
    Run installer hooks defined in plugins
    """
    hook = plugin_manager.hook
    # Install apt packages
    apt_packages = list(set(itertools.chain(*hook.tljh_extra_apt_packages())))
    if apt_packages:
        logger.info(
            "Installing {} apt packages collected from plugins: {}".format(
                len(apt_packages), " ".join(apt_packages)
            )
        )
        apt.install_packages(apt_packages)

    # Install hub pip packages
    hub_pip_packages = list(set(itertools.chain(*hook.tljh_extra_hub_pip_packages())))
    if hub_pip_packages:
        logger.info(
            "Installing {} hub pip packages collected from plugins: {}".format(
                len(hub_pip_packages), " ".join(hub_pip_packages)
            )
        )
        conda.ensure_pip_packages(
            HUB_ENV_PREFIX,
            hub_pip_packages,
            upgrade=True,
        )

    # Install conda packages
    conda_packages = list(set(itertools.chain(*hook.tljh_extra_user_conda_packages())))
    if conda_packages:
        logger.info(
            "Installing {} user conda packages collected from plugins: {}".format(
                len(conda_packages), " ".join(conda_packages)
            )
        )
        conda.ensure_conda_packages(USER_ENV_PREFIX, conda_packages)

    # Install pip packages
    user_pip_packages = list(set(itertools.chain(*hook.tljh_extra_user_pip_packages())))
    if user_pip_packages:
        logger.info(
            "Installing {} user pip packages collected from plugins: {}".format(
                len(user_pip_packages), " ".join(user_pip_packages)
            )
        )
        conda.ensure_pip_packages(
            USER_ENV_PREFIX,
            user_pip_packages,
            upgrade=True,
        )

    # Custom post install actions
    hook.tljh_post_install()
def run_plugin_actions ( plugin_manager ) : hook = plugin_manager . hook # Install apt packages apt_packages = list ( set ( itertools . chain ( * hook . tljh_extra_apt_packages ( ) ) ) ) if apt_packages : logger . info ( "Installing {} apt packages collected from plugins: {}" . format ( len ( apt_packages ) , " " . join ( apt_packages ) ) ) apt . install_packages ( apt_packages ) # Install hub pip packages hub_pip_packages = list ( set ( itertools . chain ( * hook . tljh_extra_hub_pip_packages ( ) ) ) ) if hub_pip_packages : logger . info ( "Installing {} hub pip packages collected from plugins: {}" . format ( len ( hub_pip_packages ) , " " . join ( hub_pip_packages ) ) ) conda . ensure_pip_packages ( HUB_ENV_PREFIX , hub_pip_packages , upgrade = True , ) # Install conda packages conda_packages = list ( set ( itertools . chain ( * hook . tljh_extra_user_conda_packages ( ) ) ) ) if conda_packages : logger . info ( "Installing {} user conda packages collected from plugins: {}" . format ( len ( conda_packages ) , " " . join ( conda_packages ) ) ) conda . ensure_conda_packages ( USER_ENV_PREFIX , conda_packages ) # Install pip packages user_pip_packages = list ( set ( itertools . chain ( * hook . tljh_extra_user_pip_packages ( ) ) ) ) if user_pip_packages : logger . info ( "Installing {} user pip packages collected from plugins: {}" . format ( len ( user_pip_packages ) , " " . join ( user_pip_packages ) ) ) conda . ensure_pip_packages ( USER_ENV_PREFIX , user_pip_packages , upgrade = True , ) # Custom post install actions hook . tljh_post_install ( )