HOME


Mini Shell 1.0
DIR: /snap/certbot/4482/lib/python3.12/site-packages/wheel/cli/__pycache__/
Upload File :
Current File : //snap/certbot/4482/lib/python3.12/site-packages/wheel/cli/__pycache__/pack.cpython-312.pyc
�

�S�g���ddlmZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZejd�Zd
d�Zdd	�Zy)�)�annotationsN)�BytesGenerator)�BytesParser)�
WheelError)�	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$c	��tj|�D�cgc]V}tjjtjj	||��rt
j
|�r|��X}}t|�dkDrtd|����|std|����|d}t
j
|�jd�}tjj	||d�}t|d�5}ttjj��j|�}	|	j!d	g�}
|	j#d
�}|
std|�d���	d
d
d
�|�|n}|�H	d
=|r
||	d
<|d|zz
}|k7r1t|d�5}t%|d��j'|	�d
d
d
�t)
�}tjj	||�d|�d��}
t+|
d�5}t-d|
�d�dd��|j/|�d
d
d
�t-d�y
cc}w#1swY��xYw#1swY��xYw#1swY�2xYw)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)
    �z)Multiple .dist-info directories found in z#No .dist-info directories found in r�namever�WHEEL�rb)�policy�Tag�BuildzNo tags present in z./WHEEL; cannot determine target wheel filenameN�-�wb)�maxheaderlenz.whl�wzRepacking wheel as z...�T)�end�flush�OK)�os�listdir�path�isdir�join�DIST_INFO_RE�match�lenr�group�openr�emailr
�compat32�parse�get_all�getr�flatten�compute_tagliner�print�write_files)�	directory�dest_dir�build_number�fn�dist_info_dirs�
dist_info_dir�name_version�wheel_file_path�f�info�tags�existing_build_number�tagline�
wheel_path�wfs               �~/build/snapcraft-certbot-29b1212f749eeba2f1dece1adfe9a83a/parts/certbot/install/lib/python3.12/site-packages/wheel/cli/pack.py�packr;sM���*�*�Y�'���
�7�7�=�=������i��4�5�,�:L�:L�R�:P�	��N��
�>��Q���D�Y�K�P�Q�Q�
��>�y�k�J�K�K�#�1�%�M��%�%�m�4�:�:�9�E�L��g�g�l�l�9�m�W�E�O�	
�o�t�	$�	���%�,�,�"7�"7�8�>�>�q�A���,�,�u�b�1�� $���� 1����%�m�_�5!�"��
��	�$0�#;�<�AV�L�����M��(�D��M��C�,�.�.�L��0�0��o�t�,�
@���q�q�1�9�9�$�?�
@��d�#�G������h�<�.��'��$�(G�H�J�	�:�s�	#�"�r�
�#�J�<�s�3��4�H�
���y�!�"�
�$�K��a� 	�	��(
@�
@��"�"�s+�AH-�7A(H2�H>�5$I
�2H;�>I�
Ic��t|D�chc]}|jd�d��c}�}t|D�chc]}|jd�d��c}�}t|D�chc]}|jd�d��c}�}djdj|�dj|�dj|�g�Scc}wcc}wcc}w)zcCompute a tagline from a list of tags.

    :param tags: A list of tags
    :return: A tagline
    rrr	��.)�sorted�splitr)r5�tag�impls�abivers�	platformss     r:r(r(Ls���
��6�#�C�I�I�c�N�1�%�6�7�E��4�8�C�c�i�i��n�Q�'�8�9�G��T�:�c��	�	�#��q�)�:�;�I��8�8�S�X�X�e�_�c�h�h�w�&7����)�9L�M�N�N��7��8��:s�C�C� C
)r+�strr,rEr-z
str | None�return�None)r5z	list[str]rFrE)�
__future__r�email.policyr"�os.pathr�re�email.generatorr�email.parserr�	wheel.clir�wheel.wheelfiler�compilerr;r(��r:�<module>rSs:��"���	�*�$� �%��r�z�z�S�T��:�z	OrR