HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/wheel/cli/__pycache__/pack.cpython-310.pyc
o

��h�@svddlmZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZe�d�Zddd�Zddd�ZdS)�)�annotationsN)�BytesGenerator)�BytesParser)�
WheelError)�	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$�	directory�str�dest_dir�build_number�
str | None�return�Nonecs��fdd�t���D�}t|�dkrtd�����|s"td�����|d}t�|��d�}tj��|d�}t	|d	��'}t
tjj
d
��|�}|�dg�}	|�d�}
|	s[td
|�d���Wd�n1sewY|durp|n|
}|dur�|d=|r�||d<|d|7}||
kr�t	|d��}t|dd��|�Wd�n1s�wYt|	�}tj�||�d|�d��}t|d��}
td|�d�ddd�|
���Wd�n1s�wYtd�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)
    cs0g|]}tj�tj��|��rt�|�r|�qS�)�os�path�isdir�join�DIST_INFO_RE�match)�.0�fn�rr�9/usr/local/lib/python3.10/dist-packages/wheel/cli/pack.py�
<listcomp>s���zpack.<locals>.<listcomp>�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)r�listdir�lenrrr�grouprr�openr�emailr�compat32�parse�get_all�getr�flatten�compute_tagliner�print�write_files)rr	r
�dist_info_dirs�
dist_info_dir�name_version�wheel_file_path�f�info�tags�existing_build_number�tagline�
wheel_path�wfrrr�packsJ

�

�����rAr<�	list[str]cCsXtdd�|D��}tdd�|D��}tdd�|D��}d�d�|�d�|�d�|�g�S)zcCompute a tagline from a list of tags.

    :param tags: A list of tags
    :return: A tagline
    cS�h|]	}|�d�d�qS)r!r��split�r�tagrrr�	<setcomp>R�z"compute_tagline.<locals>.<setcomp>cSrC)r!rrDrFrrrrHSrIcSrC)r!�rDrFrrrrHTrIr!�.)�sortedr)r<�impls�abivers�	platformsrrrr3Ls"r3)rrr	rr
rrr
)r<rBrr)�
__future__r�email.policyr-�os.pathr�re�email.generatorr�email.parserr�	wheel.clir�wheel.wheelfiler�compilerrAr3rrrr�<module>s

=