Your IP : 216.73.216.60


Current Path : /opt/alt/python310/lib/python3.10/site-packages/wheel/cli/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib/python3.10/site-packages/wheel/cli/__pycache__/pack.cpython-310.opt-1.pyc

o

��a��@s\ddlmZddlZddlZddlZddlmZddlm	Z	e�
d�Ze�
d�Zdd�Z
dS)	�)�print_functionN)�
WheelError)�	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$sBuild: (\d\w*)$csf�fdd�t���D�}t|�dkrtd�����|s"td�����|d}t�|��d�}d}tj�	�|d	�}t
|��8}g}	|D]"}
|
�d
�rU|	�|
�
d�d���qA|
�d�rc|
�
d�d��}qA|	smtd
�|���Wd�n1swwY|dur�|n|}|dur�|r�|d|7}||kr�|r�d|�d�nd}t
|d��!}|��}t�||�ds�||7}|��|�|�Wd�n1s�wYtdd�|	D��}
tdd�|	D��}tdd�|	D��}d�	d�	|
�d�	|�d�	|�g�}tj�	|d�||��}t|d��}td�|�dd�tj��|���Wd�n	1�s(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��	directoryr�A/opt/alt/python310/lib/python3.10/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 {}rZnameverNZWHEELzTag: � zBuild: zCNo tags present in {}/WHEEL; cannot determine target wheel filename�-zBuild: %s
�ascii�zrb+cS�h|]	}|�d�d�qS)rr��split�r�tagrrr�	<setcomp>C�zpack.<locals>.<setcomp>cSr)rrrrrrrrDrcSr)r�rrrrrrEr�.z	{}-{}.whl�wzRepacking wheel as {}...�)�endZOK)r�listdir�lenr�formatr
r�grouprr	�open�
startswith�appendr�rstrip�encode�read�BUILD_NUM_RE�subn�truncate�write�sortedr�print�sys�stdout�flushZwrite_files)rZdest_dirZbuild_numberZdist_info_dirsZ
dist_info_dirZname_versionZexisting_build_numberZwheel_file_path�fZtags�lineZreplacementZwheel_file_contentZimplsZabiversZ	platformsZtaglineZ
wheel_pathZwfrrr�packs^



����
�	"
�r8)Z
__future__rZos.pathr�rer3Z	wheel.clirZwheel.wheelfiler�compiler
r-r8rrrr�<module>s