
    yjd                        d Z 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Z	ddZ
ddZddZddZddZddZdZddZddZdS )z
Wheel command-line utility.
    )annotationsN)ArgumentTypeError   )
WheelErrorargsargparse.NamespacereturnNonec                >    ddl m }  || j        | j                   d S )N   )unpack)r   	wheelfiledest)r   r   s     Y/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/wheel/_commands/__init__.pyunpack_fr      s0    
F4>49%%%%%    c                J    ddl m }  || j        | j        | j                   d S )Nr   )pack)r   	directorydest_dirbuild_number)r   r   s     r   pack_fr      s5    D(9:::::r   c                J    ddl m }  || j        | j        | j                   d S )Nr   )convert)r   filesr   verbose)r   r   s     r   	convert_fr      s4          GDJt|44444r   c                f     ddl m   fd j        D             }|D ]}t          |           d S )Nr   )tagsc           	   3  j   K   | ]-} |j         j        j        j        j                  V  .d S N)
python_tagabi_tagplatform_tagbuildremove).0wheelr   r   s     r   	<genexpr>ztags_f.<locals>.<genexpr>$   sb       
 
  	OLJK	
 	

 
 
 
 
 
r   )r   r(   print)r   namesnamer   s   `  @r   tags_fr-   !   so    
 
 
 
 
 Z
 
 
E   d r   c                    ddl m } 	  || j        | j                   d S # t          $ r"}t	          t          |                    |d }~ww xY w)Nr   )info)r/   r   r   FileNotFoundErrorr   str)r   r/   es      r   info_fr3   4   sj    (T^T\***** ( ( (Q  a'(s     
AAAc                6    ddl m} t          d|            d S )Nr   )__version__zwheel ) r5   r*   )r   r5   s     r   	version_fr7   =   s1    	
 ;
 
 !!!!!r   	build_tagr1   c                    | r)| d                                          st          d          d| v rt          d          | S )Nr   z!build tag must begin with a digit-z$invalid character ('-') in build tag)isdigitr   )r8   s    r   parse_build_tagr<   C   sR     H1--// H CDDD				 FGGGr   ay  Make a new wheel with given tags. Any tags unspecified will remain the same.
Starting the tags with a "+" will append to the existing tags. Starting with a
"-" will remove a tag (use --option=-TAG syntax). Multiple tags can be
separated by ".". The original file will remain unless --remove is given.  The
output filename(s) will be displayed on stdout for further processing.
argparse.ArgumentParserc                 f   t          j                                        d          } |                     dd          }|                    dddd	           |                    d
d           |                    t                     |                     dd          }|                    dd           |                    ddt          j        j	        d           |                    dd           |                    t                     |                     dd          }|                    ddd           |                    ddt          j        j	        d           |                    ddd            |                    t                     |                     d!d"t          #          }|                    d$dd%           |                    d&dd'(           |                    d)d*d+,           |                    d-d*d.,           |                    d/d*d0,           |                    d1t          d2d34           |                    t                     |                     d5d6          }|                    d
d7           |                    dddd8(           |                    t                     |                     d9d:          }|                    t                      |                     d;d<          }|                    fd=           S )>Ncommands)helpr   zUnpack wheelz--destz-dzDestination directory.)r@   defaultr   z
Wheel file)funcr   zRepack wheelr   z$Root directory of the unpacked wheelz
--dest-dirz2Directory to store the wheel (default %(default)s))rB   r@   z--build-numberz"Build tag to use in the wheel namer   zConvert egg or wininst to wheelr   *zFiles to convert)nargsr@   z/Directory to store wheels (default %(default)s)z	--verbosez-v
store_true)actionr   z"Add or replace the tags on a wheel)r@   descriptionr(   zExisting wheel(s) to retagz--removez8Remove the original files, keeping only the renamed ones)rG   r@   z--python-tagTAGzSpecify an interpreter tag(s))metavarr@   z	--abi-tagzSpecify an ABI tag(s)z--platform-tagzSpecify a platform tag(s)z--buildBUILDzSpecify a build tag)typerJ   r@   r/   z#Show information about a wheel filez"Wheel file to show information forzShow detailed file listingversionzPrint version and exitr@   zShow this helpc                ,                                     S r!   )
print_help)r   ps    r   <lambda>zparser.<locals>.<lambda>   s    q||~~ r   )argparseArgumentParseradd_subparsers
add_parseradd_argumentset_defaultsr   ospathcurdirr   r   	TAGS_HELPr<   r-   r3   r7   )	sunpack_parserrepack_parserconvert_parsertags_parserinfo_parserversion_parserhelp_parserrP   s	           @r   parserrd   U   s   !!A	j))ALLL??M$4c     {>>>H---LLnL==M{1WXXXA	     C     F+++\\)2S\TTNs9KLLL>	      T,GGGY///,,9y   K WC6RSSSG    
 ,K     [%>UVVV%.I     ?T     &))),,v,Q,RRK[/STTTT,5Q     &)))\\)2J\KKNY///,,v,<,==K"="="="=>>>Hr   intc                 (   t                      } |                                 }t          |d          s|                                  nJ	 |                    |           dS # t
          $ r%}t          |t          j                   Y d }~nd }~ww xY wdS )NrC   r   )filer   )	rd   
parse_argshasattrrO   rC   r   r*   sysstderr)rP   r   r2   s      r   mainrl      s    A<<>>D4   &		&IIdOOO1 	& 	& 	&!#*%%%%%%%%%	& 1s   	A   
B*B

B)r   r   r	   r
   )r8   r1   r	   r1   )r	   r=   )r	   re   )__doc__
__future__r   rR   rX   rj   r   r   r   r   r   r   r-   r3   r7   r<   r[   rd   rl    r   r   <module>rp      s,    # " " " " "  				 



 & & & & & & " " " " " "& & & &; ; ; ;5 5 5 5   &( ( ( (" " " "   	E E E EP     r   