
    d                        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 Z	d Z
d	 Zd
 Z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__     N/var/www/html/t/fyr/venv311/lib/python3.11/site-packages/wheel/cli/__init__.pyr   r      s        Dr   r   c                >    ddl m }  || j        | j                   d S )N   )unpack)r   	wheelfiledest)argsr   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_fr.   #   so    
 
 
 
 
 Z
 
 
E   d r   c                6    ddl m} t          d|z             d S )N   )__version__zwheel %s) r1   r+   )r   r1   s     r   	version_fr3   6   s-    	*{
"#####r   	build_tagstrreturnc                ~    | 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   )r4   s    r   parse_build_tagr:   <   sJ    Q<!! 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))r?   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)rD   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)typerG   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:   r.   r3   )sunpack_parserrepack_parserconvert_parsertags_parserversion_parserhelp_parserrM   s          @r   parserr`   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 )Nr@   r   )filer   )	r`   
parse_argshasattrrL   r@   r   r+   sysstderr)rM   r   es      r   mainrh      s    A<<>>D4   &		&IIdOOO1 	& 	& 	&!#*%%%%%%%%%	& 1s   	A   
B*B

B)r4   r5   r6   r5   )__doc__
__future__r   rO   rU   re   r   	Exceptionr   r   r   r   r.   r3   r:   rX   r`   rh   r
   r   r   <module>rl      s	    # " " " " "  				 



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