
    Yh2                        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y)z
Wheel command-line utility.
    )annotationsN)ArgumentTypeErrorc                      e Zd Zy)
WheelErrorN)__name__
__module____qualname__     c/var/www/django-portfolio.reubendavern.link/venv/lib/python3.12/site-packages/wheel/cli/__init__.pyr   r      s    r   r   c                J    ddl m }  || j                  | j                         y )N   )unpack)r   	wheelfiledest)argsr   s     r   unpack_fr      s    
4>>499%r   c                `    ddl m }  || j                  | j                  | j                         y )Nr   )pack)r   	directorydest_dirbuild_number)r   r   s     r   pack_fr      s    (9(9:r   c                `    ddl m }  || j                  | j                  | j                         y )Nr   )convert)r   filesr   verbose)r   r   s     r   	convert_fr      s     DJJt||4r   c                d     ddl m   fd j                  D        }|D ]  }t        |        y )Nr   )tagsc           	   3     K   | ]C  } |j                   j                  j                  j                  j                         E y wN)
python_tagabi_tagplatform_tagbuildremove).0wheelr   r    s     r   	<genexpr>ztags_f.<locals>.<genexpr>&   sH      
  	OOLLJJKK	

s   A	A)r    r)   print)r   namesnamer    s   `  @r   tags_fr.   #   s3    
 ZZ
E  dr   c                ,    ddl m} t        d|        y )N   )__version__zwheel ) r1   r+   )r   r1   s     r   	version_fr3   6   s    	F;-
 !r   c                d    | r| d   j                         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   )	build_tags    r   parse_build_tagr8   <   s:    1--/ CDD			 F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                         j                  d      } | j                  dd      }|j	                  dddd	       |j	                  d
d       |j                  t               | j                  dd      }|j	                  dd       |j	                  ddt        j                  j                  d       |j	                  dd       |j                  t               | j                  dd      }|j	                  ddd       |j	                  ddt        j                  j                  d       |j	                  ddd        |j                  t               | j                  d!d"t        #      }|j	                  d$dd%       |j	                  d&dd'(       |j	                  d)d*d+,       |j	                  d-d*d.,       |j	                  d/d*d0,       |j	                  d1t        d2d34       |j                  t               | j                  d5d6      }|j                  t               | j                  d7d8      }|j                  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)rB   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)typerE   r;   versionzPrint version and exitr;   zShow this helpc                $    j                         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_HELPr8   r.   r3   )sunpack_parserrepack_parserconvert_parsertags_parserversion_parserhelp_parserrK   s          @r   parserr^   N   s   !A	j)ALLL?M$4c   {>H-LLnL=M{1WXA	   C   F+\\)2S\TNs9KL>	    T,GY/,,9y  K WC6RSG  
 ,K   [%>UV%.I   ?T   &)\\)2J\KNY/,,v,<,=K"=>Hr   c                     t               } | j                         }t        |d      s| j                          y	 |j	                  |       y# t
        $ r%}t        |t        j                         Y d }~yd }~ww xY w)Nr>   r   )filer   )	r^   
parse_argshasattrrJ   r>   r   r+   sysstderr)rK   r   es      r   mainrf      sc    A<<>D4 	 	&IIdO 	&!#**%%	&s   A 	A9A44A9)r   zargparse.NamespacereturnNone)r7   strrg   ri   )__doc__
__future__r   rM   rS   rc   r   	Exceptionr   r   r   r   r.   r3   r8   rV   r^   rf   r
   r   r   <module>rm      sW    #  	 
 &	 	&;5&"	>Br   