
    m&ph                        S SK Jr  S SKrS SKrS SKrS SKJr  S SK	J
r
  S SKJr  S SKJr  \R                  " S5      rS
S jrSS	 jrg)    )annotationsN)BytesGenerator)BytesParser)
WheelError)	WheelFilez6^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$c           	        [         R                  " U 5       Vs/ s Hd  n[         R                  R                  [         R                  R	                  X5      5      (       d  MF  [
        R                  U5      (       d  Mb  UPMf     nn[        U5      S:  a  [        SU  35      eU(       d  [        SU  35      eUS   n[
        R                  U5      R                  S5      n[         R                  R	                  XS5      n[        US5       n[        [        R                  R                  S9R                  U5      n	U	R!                  S	/ 5      n
U	R#                  S
5      nU
(       d  [        SU S35      e SSS5        Ub  UOWnUbJ  W	S
	 U(       a  X)S
'   USU-   -  nUW:w  a.  [        US5       n[%        USS9R'                  U	5        SSS5        [)        W
5      n[         R                  R	                  X SU S35      n[+        US5       n[-        SU S3SSS9  UR/                  U 5        SSS5        [-        S5        gs  snf ! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       NA= f)a.  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)
   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)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                  A/var/www/html/venv/lib/python3.13/site-packages/wheel/cli/pack.pypackr;      s5    **Y''B77==i45 	:F:L:LR:P 	'  
 >QDYKPQQ>ykJKK #1%M%%m4::9EL ggll9WEO	ot	$%,,"7"78>>qA,,ub1 $ 1%m_ 5! "   
% $0#;<AVLM(MC,..L00ot,qq199$? - d#G h.'$(GHJ	:s	#r#J<s34H
y! 
$ 
$Ka  
%	$( -, 
$	#s7   AI"I>IA*I
2I!I,

I
I),
I:c                   [        U  Vs1 s H  oR                  S5      S   iM     sn5      n[        U  Vs1 s H  oR                  S5      S   iM     sn5      n[        U  Vs1 s H  oR                  S5      S   iM     sn5      nSR                  SR                  U5      SR                  U5      SR                  U5      /5      $ s  snf s  snf s  snf )zWCompute a tagline from a list of tags.

:param tags: A list of tags
:return: A tagline
r   r   r	      .)sortedsplitr   )r5   tagimplsabivers	platformss        r:   r(   r(   L   s     6#IIcN1%67E484CiinQ'489GT:Tc		#q)T:;I88SXXe_chhw&7)9LMNN 78:s   C	C$C)r+   strr,   rE   r-   z
str | NonereturnNone)r5   z	list[str]rF   rE   )
__future__r   email.policyr"   os.pathr   reemail.generatorr   email.parserr   	wheel.clir   wheel.wheelfiler   compiler   r;   r(        r:   <module>rS      s8    "   	 * $   %zzST:z	OrR   