Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/wheel/cli/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/wheel/cli/__pycache__/pack.cpython-38.pyc
U

H��g�@s�ddlmZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZe�d�Zddd	d
d�dd
�Zddd�dd�ZdS)�)�annotationsN)�BytesGenerator)�BytesParser)�
WheelError)�	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$�strz
str | None�None)�	directory�dest_dir�build_number�returnc	s��fdd�t���D�}t|�dkr4td�����n|sFtd�����|d}t�|��d�}tj��|d�}t	|d	��D}t
tjj
d
��|�}|�dg�}	|�d�}
|	s�td
|�d���W5QRX|dk	r�|n|
}|dk	�r,|d=|r�||d<|d|7}||
k�r,t	|d��}t|dd��|�W5QRXt|	�}tj�||�d|�d��}t|d��&}
td|�d�ddd�|
���W5QRXtd�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�r	r
�;/opt/cppython/lib/python3.8/site-packages/wheel/cli/pack.py�
<listcomp>s
�zpack.<locals>.<listcomp>�z)Multiple .dist-info directories found in z#No .dist-info directories found in rZnamever�WHEEL�rb)�policy�TagZBuildzNo 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�printZwrite_files)r	r
rZdist_info_dirs�
dist_info_dirZname_versionZwheel_file_path�f�info�tagsZexisting_build_numberZtagline�
wheel_pathZwfr
rr�packsB

�

�

r7z	list[str])r5r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
    cSsh|]}|�d�d�qS)rr��split�r�tagr
r
r�	<setcomp>Rsz"compute_tagline.<locals>.<setcomp>cSsh|]}|�d�d�qS)rrr8r:r
r
rr<SscSsh|]}|�d�d�qS)r�r8r:r
r
rr<Tsr�.)�sortedr)r5ZimplsZabivers�	platformsr
r
rr0Lsr0)�
__future__r�email.policyr*�os.pathr�re�email.generatorr�email.parserrZ	wheel.clirZwheel.wheelfiler�compilerr7r0r
r
r
r�<module>s
=

F1le Man4ger