Your IP : 216.73.216.213


Current Path : /opt/alt/python311/lib/python3.11/site-packages/wheel/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib/python3.11/site-packages/wheel/__pycache__/metadata.cpython-311.opt-1.pyc

�

��a���R�dZddlZddlZddlZddlmZd�Zd�Zd�Z	d�Z
d	�Zd
�ZdS)z2
Tools for converting old- to new-style metadata.
�N�)�
read_pkg_infoc���t|dd��r
d|jzSg}|jD]\}}|�||z���|sdSdd�t|����zS)zFReturn the version specifier for a requirement in PEP 345/566 fashion.�urlNz @ �z (%s)�,)�getattrr�specs�append�join�sorted)�requirement�
requires_dist�op�vers    �A/opt/alt/python311/lib/python3.11/site-packages/wheel/metadata.py�requires_to_requires_distr
s����{�E�4�(�(�'��{��&�&��M��$�'�'���C����R�#�X�&�&�&�&����r��S�X�X�f�]�3�3�4�4�4�4�c#��K�|D]m}tj�|��}t|��}d�t|j����}|rd|z}|j|z|zV��ndS)z=Yield Requires-Dist: strings for parsed requirements strings.rz[%s]N)�
pkg_resources�Requirement�parserrr
�extras�project_name)�requirements�req�parsed_requirement�specrs     r�convert_requirementsrs������@�@��*�6�<�<�S�A�A��(�);�<�<�����&�!3�!:�;�;�<�<���	%��f�_�F�!�.��7�$�>�?�?�?�?�
@�@rc#�$K�|���D]x\}}d}|pd}d|vr|�dd��\}}tj|��}|rd|fV�|rd|zdz}|d|zz
}|rd|z}t	|��D]}d	||zfV���yd
S)a,
    Convert requirements from a setup()-style dictionary to ('Requires-Dist', 'requirement')
    and ('Provides-Extra', 'extra') tuples.

    extras_require is a dictionary of {extra: [requirements]} as passed to setup(),
    using the empty extra {'': [requirements]} to hold install_requires.
    r�:r�Provides-Extra�(z) and z
extra == '%s'z ; �
Requires-DistN)�items�splitr�
safe_extrar)�extras_require�extra�depends�	condition�new_reqs     r�generate_requirementsr-%s�����)�.�.�0�0�7�7���w��	������%�<�<�$�{�{�3��2�2��E�9��(��/�/���	1�"�E�)�)�)�)��
7��)�O�h�6�	���5�0�0�I��	*��	�)�I�+�G�4�4�	7�	7�G�!�7�Y�#6�6�6�6�6�6�	7�!7�7rc�n�t|��}|�dd��|d=|d=tj�|d��}tj�|��r�t
|��5}|���}ddd��n#1swxYwYttj
|��d����}|D]9\}}t||i��D]"\}	}
|	|
f|���vr|
||	<�#�:|d	}|r%|�
t|����|d	=|S)
zN
    Convert .egg-info directory with PKG-INFO to the Metadata 2.1 format
    zMetadata-Versionz2.1r"r$zrequires.txtNc��|dpdS)Nrr�)�xs r�<lambda>z%pkginfo_to_metadata.<locals>.<lambda>Ps��1�Q�4�:�2�r)�key�Description)r�replace_header�os�pathr�exists�open�readr
r�split_sectionsr-r%�set_payload�dedent_description)�
egg_info_path�pkginfo_path�pkg_info�
requires_path�
requires_file�requires�parsed_requirementsr)�reqsr3�value�descriptions            r�pkginfo_to_metadatarHAs����\�*�*�H����.��6�6�6��!�"���!��G�L�L���?�?�M�	�w�~�~�m�$�$�	*�
�-�
 �
 �	,�M�$�)�)�+�+�H�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�%�]�%A�(�%K�%K�)=�)=�?�?�?��.�	*�	*�K�E�4�3�U�D�M�B�B�
*�
*�
��U���<�x�~�~�'7�'7�7�7�$)�H�S�M��
*��=�)�K��$����/��9�9�:�:�:��]�#��Os�:B�B�"Bc�4�||}|���}t|t��sf|���D]Q}|d���|kr1|d�dd���d��}n�R|S)z<Hack to coax Unicode out of an email Message() - Python 3.3+rr�ascii�surrogateescapezutf-8)�lower�
isinstance�str�	raw_items�encode�decode)r@�field�text�items    r�pkginfo_unicoderU^s����E�?�D��K�K�M�M�E��d�C� � ���&�&�(�(�	�	�D��A�w�}�}���%�'�'��A�w�~�~�g�/@�A�A��V�G�_�_����(�
�Krc
��|d}d}t|t��sd}t|d��}|���}d�|d���t
jd�|dd�����df��}|r)|�d���	d	d
��}|S)z@
    Dedent and convert pkg_info['Description'] to Unicode.
    r4FT�
rrN�utf8rJrK)
rMrNrU�
splitlinesr�lstrip�textwrap�dedentrPrQ)r@rG�
surrogates�description_lines�description_dedents     rr=r=ls����=�)�K��J��k�3�'�'�?��
�%�h�
�>�>��#�.�.�0�0�����
�1�	�	$�	$�	&�	&�	�����#4�Q�R�R�#8�9�9�	:�	:�	
�	�����0�/�
�V�F�^�^�
�V�G�.�
/�
/�	��r)
�__doc__�os.pathr6r[r�pkginforrrr-rHrUr=r0rr�<module>rcs�����������������"�"�"�"�"�"�
5�
5�
5�@�@�@�7�7�7�8���:�������r