Your IP : 216.73.217.117


Current Path : /lib/python3/dist-packages/wheel/cli/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/wheel/cli/__pycache__/pack.cpython-311.pyc

�

�lc7
���ddlmZddlZddlZddlmZddlmZej	d��Z
ej	d��Zd
d�ZdS)�)�annotationsN)�
WheelError)�	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$sBuild: (\d\w*)$�	directory�str�dest_dir�build_number�
str | Nonec�.���fd�tj���D��}t|��dkrtd������|std������|d}t�|���d��}d}tj��|d��}t|��5}g}	|D]�}
|
�
d	��rA|	�|
�d
��d�
�����X|
�
d��r-|
�d
��d�
��}��|	s"td�|�����	ddd��n#1swxYwY|�|n|}|��|r|d
|zz
}||kr�|rd|z�d��nd}t|d��5}|���}t"�||��\}}
|
s||z
}|�d��|���|�|��ddd��n#1swxYwYt-d�|	D����}t-d�|	D����}t-d�|	D����}d
�d�|��d�|��d�|��g��}tj�||�d
|�d���}t/|d��5}t1d|�d�dd���|����ddd��n#1swxYwYt1d��dS)aBRepack a previously unpacked wheel directory into a new wheel file.

    The .dist-info/WHEEL file must contain one or more tags so that the target
    wheel file name can be determined.

    :param directory: The unpacked wheel directory
    :param dest_dir: Destination directory (defaults to the current directory)
    c����g|][}tj�tj��|�����?t�|���Y|��\S�)�os�path�isdir�join�DIST_INFO_RE�match)�.0�fnrs  ��0/usr/lib/python3/dist-packages/wheel/cli/pack.py�
<listcomp>zpack.<locals>.<listcomp>sf�������
�7�=�=�����i��4�4�5�5��;G�:L�:L�R�:P�:P��
�����z)Multiple .dist-info directories found in z#No .dist-info directories found in r�nameverN�WHEELzTag: � zBuild: zCNo tags present in {}/WHEEL; cannot determine target wheel filename�-zBuild: %s
�asciirzrb+c�D�h|]}|�d��d��S)rr��split�r�tags  r�	<setcomp>zpack.<locals>.<setcomp>Os'��6�6�6�#�C�I�I�c�N�N�1�%�6�6�6rc�D�h|]}|�d��d��S)rrr r"s  rr$zpack.<locals>.<setcomp>Ps'��8�8�8�C�c�i�i��n�n�Q�'�8�8�8rc�D�h|]}|�d��d��S)r�r r"s  rr$zpack.<locals>.<setcomp>Qs'��:�:�:�c��	�	�#���q�)�:�:�:r�.z.whl�wzRepacking wheel as z...�T)�end�flush�OK)r�listdir�lenrrr�grouprr�open�
startswith�appendr!�rstrip�format�encode�read�BUILD_NUM_RE�subn�seek�truncate�write�sortedr�print�write_files)rrr	�dist_info_dirs�
dist_info_dir�name_version�existing_build_number�wheel_file_path�f�tags�line�replacement�wheel_file_content�num_replaced�impls�abivers�	platforms�tagline�
wheel_path�wfs`                   r�packrQ
s���������*�Y�'�'����N�
�>���Q����P�Y�P�P�Q�Q�Q�
�L��J�y�J�J�K�K�K�#�1�%�M��%�%�m�4�4�:�:�9�E�E�L�!���g�l�l�9�m�W�E�E�O�	
�o�	�	��!����	D�	D�D����w�'�'�
D����D�J�J�s�O�O�A�.�5�5�7�7�8�8�8�8�����+�+�
D�(,�
�
�3����(:�(A�(A�(C�(C�%���	���!�6�-�0�0���
�	�������������������$0�#;�<�<�AV�L����	/��C�,�.�.�L��0�0�0� ���<�/�7�7��@�@�@��
�
�o�u�-�-�

,��%&�V�V�X�X�"�3?�3D�3D��!3�4�4�0�"�L�$�6�&�+�5�&����q�	�	�	��
�
�������*�+�+�+�

,�

,�

,�

,�

,�

,�

,�

,�

,�

,�

,����

,�

,�

,�

,�
�6�6��6�6�6�7�7�E��8�8�4�8�8�8�9�9�G��:�:�T�:�:�:�;�;�I��h�h����������'�):�):�C�H�H�Y�<O�<O�P�Q�Q�G�����h�<�(G�(G�'�(G�(G�(G�H�H�J�	�:�s�	#�	#�"�r�
�3�J�3�3�3��4�H�H�H�H�
���y�!�!�!�"�"�"�"�"�"�"�"�"�"�"����"�"�"�"�
�$�K�K�K�K�Ks8�CF�F�F�"A8I&�&I*�-I*�,M;�;M?�M?)rrrrr	r
)
�
__future__r�os.pathr�re�	wheel.clir�wheel.wheelfiler�compilerr8rQr
rr�<module>rXs���"�"�"�"�"�"�����	�	�	�	� � � � � � �%�%�%�%�%�%��r�z�S�T�T���r�z�-�.�.��M�M�M�M�M�Mr