B
    ê¹`Y  ã               @   s(   d Z ddlZdd„ Zdd„ Zdd„ ZdS )	z!Plugin support library for PGWUI
é    Nc             C   s   |   d¡d S )zEReturn the python distribution (package name) from a module name
    Ú.r   )Úsplit)Úmodule© r   ú[/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/pgwui_common/plugin.pyÚget_component   s    r   c               C   s   dd„ t  d¡D ƒS )z8Return list of all pgwui component names as strings
    c             S   s   g | ]}t | ¡ jƒ‘qS r   )r   ÚresolveÚ__name__)Ú.0Úentry_pointr   r   r   ú
<listcomp>%   s    z)find_pgwui_components.<locals>.<listcomp>zpgwui.components)Úpkg_resourcesÚiter_entry_pointsr   r   r   r   Úfind_pgwui_components"   s    r   c              C   s4   t ƒ } x(t d¡D ]}| ¡ }|| t|jƒ< qW | S )zPReturn dict of all pgwui.check_setting entry points, keyed by
    component
    zpgwui.check_settings)Údictr   r   r   r   Ú
__module__)Zcheck_settingsr   Úcallabler   r   r   Úfind_pgwui_check_settings)   s
    r   )Ú__doc__r   r   r   r   r   r   r   r   Ú<module>   s   