o
    !d                     @   s<   d dl Z d dlmZ e dZddiZdddZd	d
 ZdS )    N)HierarchicalEmitterzawscli.pluginZ__builtin__zawscli.handlersTc                 C   sX   |r|  t t| }|du rt }t|  |D ]\}}td|| || q|S )a  

    :type plugin_mapping: dict
    :param plugin_mapping: A dict of plugin name to import path,
        e.g. ``{"plugingName": "package.modulefoo"}``.

    :type event_hooks: ``EventHooks``
    :param event_hooks: Event hook emitter.  If one if not provided,
        an emitter will be created and returned.  Otherwise, the
        passed in ``event_hooks`` will be used to initialize plugins.

    :type include_builtins: bool
    :param include_builtins: If True, the builtin awscli plugins (specified in
        ``BUILTIN_PLUGINS``) will be included in the list of plugins to load.

    :rtype: HierarchicalEmitter
    :return: An event emitter object.

    NzInitializing plugin %s: %s)	updateBUILTIN_PLUGINS_import_pluginsr   zipkeyslogdebugZawscli_initialize)Zplugin_mappingZevent_hooksZinclude_builtinsmodulesnameZplugin r   1usr/lib/python3.10/site-packages/awscli/plugin.pyload_plugins   s   
r   c                 C   sh   g }|   D ]+\}}td|| d|vr|t| q|dd\}}t||gd}|| q|S )NzImporting plugin %s: %s.   )fromlist)itemsr   r	   append
__import__rsplit)Zplugin_namesZpluginsr   pathpackagemoduler   r   r   r   5   s   r   )NT)loggingZbotocore.hooksr   	getLoggerr   r   r   r   r   r   r   r   <module>   s   

