Your IP : 216.73.216.213
�
��a� � �R � d Z ddlZddlZddlZddlmZ d� Zd� Zd� Z d� Z
d � Zd
� ZdS )z2
Tools for converting old- to new-style metadata.
� N� )�
read_pkg_infoc �� � t | dd� � r
d| j z S g }| j D ]\ }}|� ||z � � �|sdS dd� t |� � � � z S )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}t j � |� � }t |� � }d� t |j � � � � }|rd|z }|j |z |z V � �ndS )z=Yield Requires-Dist: strings for parsed requirements strings.r z[%s]N)�
pkg_resources�Requirement�parser r r
�extras�project_name)�requirements�req�parsed_requirement�specr s r �convert_requirementsr s� � � � �� @� @��*�6�<�<�S�A�A��(�);�<�<�����&�!3�!:�;�;�<�<��� %��f�_�F�!�.��7�$�>�?�?�?�?�
@� @r c # �$ K � | � � � D ]x\ }}d}|pd}d|v r|� dd� � \ }}t j |� � }|rd|fV � |rd|z dz }|d|z z
}|rd|z }t |� � D ]}d ||z fV � ��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� 7r c �n � t |� � }|� dd� � |d= |d= t j � | d� � }t j � |� � r�t
|� � 5 }|� � � }ddd� � n# 1 swxY w Y t t j
|� � d� �� � }|D ]9\ }}t ||i� � D ]"\ } }
| |
f|� � � vr|
|| <