Current Path : /usr/lib/python3.12/site-packages/setuptools/__pycache__/ |
Current File : //usr/lib/python3.12/site-packages/setuptools/__pycache__/_entry_points.cpython-312.pyc |
� Z�i�1=��� �J � d dl Z d dlZd dlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZ d � Zd � Zd� Zde j$ fd �Ze j( d� � Zej- e� d� � Zej- ed� d� � ede j$ fd�� Zd� Zy)� N� )�OptionError)�yield_lines)� pass_none)�metadata)� ensure_unique)�consumec �p � | j y# t t f$ r}d| � d�}t |� |�d}~ww xY w)zR Exercise one of the dynamic properties to trigger the pattern match. zProblems to parse zq. Please ensure entry-point follows the spec: https://packaging.python.org/en/latest/specifications/entry-points/N)�extras�AttributeError�AssertionErrorr )�ep�ex�msgs �=/usr/lib/python3.12/site-packages/setuptools/_entry_points.py�ensure_validr sL � � '� � � ���N�+� '� !��� %R� R� � �#��B�&�� '�s � �5�0�5c � � t | � }d|� d�dj |� z }t j j |� S )zf Given a value of an entry point or series of entry points, return each as an EntryPoint. �[�] � )r �joinr �EntryPoints� _from_text)�value�group�lines�texts r � load_groupr s@ � � ���E� �u�g�S�>�D�I�I�e�,�,�D����*�*�4�0�0� c �2 � | j | j fS �N)r �name)r s r �by_group_and_namer# ( s � � �8�8�R�W�W��r �epsc �V � t t t t | t �� � � | S )zM Ensure entry points are unique by group and name and validate each. ��key)r �mapr r r# �r$ s r �validater* , s � � �C��m�C�5F�G�H�I��Jr c � � t j j d� | j � D � � }t t j |� � S )zA Given a Distribution.entry_points, produce EntryPoints. c 3 �: K � | ] \ }}t ||� �� � y �wr! )r )�.0r r s r � <genexpr>zload.<locals>.<genexpr>9 s � �� � +�%1�U�E� �5�%� �+�s �)� itertools�chain� from_iterable�itemsr* r r )r$ �groupss r �loadr4 4 sC � � �_�_� *� *� +�58�Y�Y�[�+� �F� �H�(�(��0�1�1r c �x � t t j t j j | � � � S )z� >>> ep, = load('[console_scripts]\nfoo=bar') >>> ep.group 'console_scripts' >>> ep.name 'foo' >>> ep.value 'bar' )r* r r r r) s r �_r6 ? s+ � � �H�(�(��)=�)=�)H�)H��)M�N�O�Or c � � | S r! � )�xs r �<lambda>r: M s � �A� r c � � t j d� }t j t | |�� |� }dj d� |D � � S )Nr r&