
    gP                        S r 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 jr	SS jr
SS	 jrSS
 jrSS jrSS jrSrSS jrSS jrg)z
Wheel command-line utility.
    )annotationsN)ArgumentTypeError   )
WheelErrorc                J    SSK J n  U" U R                  U R                  5        g )N   )unpack)r	   	wheelfiledest)argsr	   s     :/usr/lib/python3/dist-packages/wheel/_commands/__init__.pyunpack_fr      s    
4>>499%    c                `    SSK J n  U" U R                  U R                  U R                  5        g )Nr   )pack)r   	directorydest_dirbuild_number)r   r   s     r   pack_fr      s    (9(9:r   c                `    SSK J n  U" U R                  U R                  U R                  5        g )Nr   )convert)r   filesr   verbose)r   r   s     r   	convert_fr      s     DJJt||4r   c                j   ^ ^ SSK J m  U U4S jT R                   5       nU H  n[        U5        M     g )Nr   )tagsc           	   3     >#    U  HD  nT" UTR                   TR                  TR                  TR                  TR                  5      v   MF     g 7fN)
python_tagabi_tagplatform_tagbuildremove).0wheelr   r   s     r   	<genexpr>tags_f.<locals>.<genexpr>$   sN      
  E 	OOLLJJKK	
 	
  s   AA)r   r%   print)r   namesnamer   s   `  @r   tags_fr+   !   s.    
 ZZ
E d r   c                ,    SSK Jn  [        SU 35        g )Nr   )__version__zwheel ) r-   r(   )r   r-   s     r   	version_fr/   4   s    	F;-
 !r   c                |    U (       a#  U S   R                  5       (       d  [        S5      eSU ;   a  [        S5      eU $ )Nr   z!build tag must begin with a digit-z$invalid character ('-') in build tag)isdigitr   )	build_tags    r   parse_build_tagr4   :   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                 D  ^ [         R                  " 5       mTR                  SS9n U R                  SSS9nUR	                  SSSSS	9  UR	                  S
SS9  UR                  [        S9  U R                  SSS9nUR	                  SSS9  UR	                  SS[        R                  R                  SS9  UR	                  SSS9  UR                  [        S9  U R                  SSS9nUR	                  SSSS9  UR	                  SS[        R                  R                  SS9  UR	                  SSSS 9  UR                  [        S9  U R                  S!S"[        S#9nUR	                  S$SS%S9  UR	                  S&SS'S(9  UR	                  S)S*S+S,9  UR	                  S-S*S.S,9  UR	                  S/S*S0S,9  UR	                  S1[        S2S3S49  UR                  [        S9  U R                  S5S6S9nUR                  [        S9  U R                  S7S8S9nUR                  U4S9 jS9  T$ ):Ncommands)helpr	   zUnpack wheelz--destz-dzDestination directory.)r7   defaultr
   z
Wheel file)funcr   zRepack wheelr   z$Root directory of the unpacked wheelz
--dest-dirz2Directory to store the wheel (default %(default)s))r9   r7   z--build-numberz"Build tag to use in the wheel namer   zConvert egg or wininst to wheelr   *zFiles to convert)nargsr7   z/Directory to store wheels (default %(default)s)z	--verbosez-v
store_true)actionr   z"Add or replace the tags on a wheel)r7   descriptionr%   zExisting wheel(s) to retagz--removez8Remove the original files, keeping only the renamed ones)r>   r7   z--python-tagTAGzSpecify an interpreter tag(s))metavarr7   z	--abi-tagzSpecify an ABI tag(s)z--platform-tagzSpecify a platform tag(s)z--buildBUILDzSpecify a build tag)typerA   r7   versionzPrint version and exitr7   zShow this helpc                $   > TR                  5       $ r   )
print_help)r   ps    r   <lambda>parser.<locals>.<lambda>   s    q||~r   )argparseArgumentParseradd_subparsers
add_parseradd_argumentset_defaultsr   ospathcurdirr   r   	TAGS_HELPr4   r+   r/   )sunpack_parserrepack_parserconvert_parsertags_parserversion_parserhelp_parserrG   s          @r   parserr[   L   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                     [        5       n U R                  5       n[        US5      (       d  U R                  5         g UR	                  U5        g! [
         a"  n[        U[        R                  S9   S nAgS nAff = f)Nr:   r   )filer   )	r[   
parse_argshasattrrF   r:   r   r(   sysstderr)rG   r   es      r   mainrc      sc    A<<>D4  	 	&IIdO 	&!#**%	&s   A 
A<A77A<)r   zargparse.NamespacereturnNone)r3   strrd   rf   )rd   zargparse.ArgumentParser)rd   int)__doc__
__future__r   rJ   rP   r`   r   r
   r   r   r   r   r+   r/   r4   rS   r[   rc    r   r   <module>rk      sN    #  	 
 & "&;5&"	>Br   