a
    ÇZEg‹  ã                   @   s&   d dl Z d dlmZ edœdd„ZdS )é    N)Úpartial)Ú
group_namec                 c   s¬   t jdkr^zddlm} W n ty,   Y n20 || d�}t|tƒs^|D ]}|j|jfV  qFdS zddl	m
} W n ty€   Y n(0 | | ¡D ]}|jt|jdd�fV  qŒdS )	zå
    Find entrypoints of a given group using either `importlib.metadata` or the
    older `pkg_resources` mechanism.

    Yields tuples of the entrypoint name and a callable function that will
    load the actual entrypoint.
    )é   é
   r   )Úentry_points)ÚgroupN)Úworking_setT)Úrequire)ÚsysÚversion_infoÚimportlib.metadatar   ÚImportErrorÚ
isinstanceÚdictÚnameÚloadÚpkg_resourcesr   Úiter_entry_pointsr   )r   r   ZepsÚentry_pointr   © r   úO/var/www/sistema_ama/venv/lib/python3.9/site-packages/babel/messages/_compat.pyÚfind_entrypoints   s     


r   )r
   Ú	functoolsr   Ústrr   r   r   r   r   Ú<module>   s   