
    DxMg2                        d Z ddlmZ ddlZddlZddlZddlmZ  G d de          ZddZ	ddZ
ddZddZddZddZdZd Zd ZdS )z
Wheel command-line utility.
    )annotationsN)ArgumentTypeErrorc                      e Zd ZdS )
WheelErrorN)__name__
__module____qualname__     2lib/python3.11/site-packages/wheel/cli/__init__.pyr   r      s        Dr   r   argsargparse.NamespacereturnNonec                >    ddl m }  || j        | j                   d S )N   )unpack)r   	wheelfiledest)r   r   s     r   unpack_fr      s0    
F4>49%%%%%r   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_fr1   #   so    
 
 
 
 
 Z
 
 
E   d r   c                6    ddl m} t          d|            d S )N   )__version__zwheel ) r4   r.   )r   r4   s     r   	version_fr6   6   s1    	
 ;
 
 !!!!!r   	build_tagstrc                    | 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   )r7   s    r   parse_build_tagr<   <   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.
c                    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          }|                    t                     |                     d7d8          }|                    fd9           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))rA   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)rF   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)typerI   r?   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<   r1   r6   )sunpack_parserrepack_parserconvert_parsertags_parserversion_parserhelp_parserrO   s          @r   parserrb   N   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     &)))\\)2J\KKNY///,,v,<,==K"="="="=>>>Hr   c                 (   t                      } |                                 }t          |d          s|                                  nJ	 |                    |           dS # t
          $ r%}t          |t          j                   Y d }~nd }~ww xY wdS )NrB   r   )filer   )	rb   
parse_argshasattrrN   rB   r   r.   sysstderr)rO   r   es      r   mainrj      s    A<<>>D4   &		&IIdOOO1 	& 	& 	&!#*%%%%%%%%%	& 1s   	A   
B*B

B)r   r   r   r   )r7   r8   r   r8   )__doc__
__future__r   rQ   rW   rg   r   	Exceptionr   r   r   r!   r1   r6   r<   rZ   rb   rj   r
   r   r   <module>rn      s"    # " " " " "  				 



 & & & & & &	 	 	 	 	 	 	 	& & & &; ; ; ;5 5 5 5   &" " " "   	> > >B    r   