
    R
h                        d dl mZ d dlZd dlZd dlZd dlmZ d dl	m
Z
 d dlmZ d dlmZ  ej        d          ZddZddZdS )    )annotationsN)BytesGenerator)BytesParser)
WheelError)	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$	directorystrdest_dirbuild_number
str | NonereturnNonec                     fdt          j                   D             }t          |          dk    rt          d            |st          d            |d         }t                              |                              d          }t           j                             |d          }t          |d          5 }t          t          j        j        	                              |          }|                    d
g           }	|                    d          }
|	st          d| d          	 ddd           n# 1 swxY w Y   ||n|
}|d|d= |r||d<   |d|z   z  }||
k    rLt          |d          5 }t#          |d                              |           ddd           n# 1 swxY w Y   t'          |	          }t           j                            || d| d          }t)          |d          5 }t+          d| ddd           |                                ddd           n# 1 swxY w Y   t+          d           dS )aB  Repack 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 | ][}t           j                            t           j                            |                    ?t                              |          Y|\S  )ospathisdirjoinDIST_INFO_REmatch).0fnr   s     Y/var/www/html/01_SiteInternet/03_Maps/venv/lib/python3.11/site-packages/wheel/cli/pack.py
<listcomp>zpack.<locals>.<listcomp>   sf       7==i4455 ;G:L:LR:P:P
         z)Multiple .dist-info directories found in z#No .dist-info directories found in r   nameverWHEELrb)policyTagBuildzNo tags present in z./WHEEL; cannot determine target wheel filenameN-wb)maxheaderlenz.whlwzRepacking wheel as z... T)endflushOK)r   listdirlenr   r   r   groupr   r   openr   emailr!   compat32parseget_allgetr   flattencompute_tagliner   printwrite_files)r   r
   r   dist_info_dirsdist_info_dirname_versionwheel_file_pathfinfotagsexisting_build_numbertagline
wheel_pathwfs   `             r   packrD      s`      *Y''  N
 >QPYPPQQQ LJyJJKKK #1%M%%m44::9EEL gll9mWEEO	ot	$	$ 	%,"7888>>qAA,,ub11 $ 1 1 	"m " " "  		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 $0#;<<AVLM 	/(DMC,..L000ot,, @qq11199$???@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ d##G h<(G(G'(G(G(GHHJ	:s	#	# "r3J3334HHHH
y!!!" " " " " " " " " " " " " " " 
$KKKKKs7   A3EEE<%F--F14F1=,H55H9<H9r?   	list[str]c                :   t          d | D                       }t          d | D                       }t          d | D                       }d                    d                    |          d                    |          d                    |          g          S )zcCompute a tagline from a list of tags.

    :param tags: A list of tags
    :return: A tagline
    c                D    h | ]}|                     d           d         S )r$   r   splitr   tags     r   	<setcomp>z"compute_tagline.<locals>.<setcomp>R   s'    666#CIIcNN1%666r   c                D    h | ]}|                     d           d         S )r$   r   rH   rJ   s     r   rL   z"compute_tagline.<locals>.<setcomp>S   s'    888CciinnQ'888r   c                D    h | ]}|                     d           d         S )r$      rH   rJ   s     r   rL   z"compute_tagline.<locals>.<setcomp>T   s'    :::c		#q):::r   r$   .)sortedr   )r?   implsabivers	platformss       r   r6   r6   L   s     6666677E88488899G::T:::;;I88SXXe__chhw&7&7)9L9LMNNNr   )r   r	   r
   r	   r   r   r   r   )r?   rE   r   r	   )
__future__r   email.policyr0   os.pathr   reemail.generatorr   email.parserr   	wheel.clir   wheel.wheelfiler   compiler   rD   r6   r   r   r   <module>r^      s    " " " " " "      				 * * * * * * $ $ $ $ $ $             % % % % % %rzSTT: : : :z	O 	O 	O 	O 	O 	Or   