a
    b3jd                     @  s   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d	d
dZ	ddd	ddZ
ddd	ddZddd	ddZddd	ddZddd	ddZdddddZdZddddZddd d!ZdS )"z
Wheel command-line utility.
    )annotationsN)ArgumentTypeError   )
WheelErrorzargparse.NamespaceNone)argsreturnc                 C  s   ddl m } || j| j d S )N   )unpack)r
   	wheelfiledest)r   r
    r   u/www/wwwroot/dpstar/app/297b3aabda72fedb274352021c2dd8b5_venv/lib/python3.9/site-packages/wheel/_commands/__init__.pyunpack_f   s    r   c                 C  s"   ddl m } || j| j| j d S )Nr	   )pack)r   	directorydest_dirbuild_number)r   r   r   r   r   pack_f   s    r   c                 C  s"   ddl m } || j| j| j d S )Nr	   )convert)r   filesr   verbose)r   r   r   r   r   	convert_f   s    r   c                   s8   ddl m   fdd jD }|D ]}t| q&d S )Nr	   )tagsc                 3  s*   | ]"}| j  j j j jV  qd S N)Z
python_tagZabi_tagZplatform_tagbuildremove).0wheelr   r   r   r   	<genexpr>$   s   	ztags_f.<locals>.<genexpr>)r   r   print)r   namesnamer   r   r   tags_f!   s    	r$   c              
   C  sV   ddl m } z|| j| j W n2 tyP } ztt||W Y d }~n
d }~0 0 d S )Nr	   )info)r%   r   r   FileNotFoundErrorr   str)r   r%   er   r   r   info_f4   s
    r)   c                 C  s   ddl m} td|  d S )Nr   )__version__zwheel ) r*   r!   )r   r*   r   r   r   	version_f=   s    r,   r'   )	build_tagr   c                 C  s.   | r| d   stdnd| v r*td| S )Nr   z!build tag must begin with a digit-z$invalid character ('-') in build tag)isdigitr   )r-   r   r   r   parse_build_tagC   s
    
r0   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.
zargparse.ArgumentParser)r   c                    s  t    jdd} | jddd}|jddddd	 |jd
dd |jtd | jddd}|jddd |jddtjj	dd |jddd |jt
d | jddd}|jdddd |jddtjj	dd |jdddd  |jtd | jd!d"td#}|jd$dd%d |jd&dd'd( |jd)d*d+d, |jd-d*d.d, |jd/d*d0d, |jd1td2d3d4 |jtd | jd5d6d}|jd
d7d |jdddd8d( |jtd | jd9d:d}|jtd | jd;d<d}|j fd=d>d  S )?Ncommands)helpr
   zUnpack wheelz--destz-dzDestination directory.)r2   defaultr   z
Wheel file)funcr   zRepack wheelr   z$Root directory of the unpacked wheelz
--dest-dirz2Directory to store the wheel (default %(default)s))r4   r2   z--build-numberz"Build tag to use in the wheel namer   zConvert egg or wininst to wheelr   *zFiles to convert)nargsr2   z/Directory to store wheels (default %(default)s)z	--verbosez-v
store_true)actionr   z"Add or replace the tags on a wheel)r2   descriptionr   zExisting wheel(s) to retagz--removez8Remove the original files, keeping only the renamed ones)r9   r2   z--python-tagZTAGzSpecify an interpreter tag(s))metavarr2   z	--abi-tagzSpecify an ABI tag(s)z--platform-tagzSpecify a platform tag(s)z--buildBUILDzSpecify a build tag)typer;   r2   r%   z#Show information about a wheel filez"Wheel file to show information forzShow detailed file listingversionzPrint version and exitr2   zShow this helpc                   s      S r   )
print_help)r   pr   r   <lambda>       zparser.<locals>.<lambda>)argparseArgumentParseradd_subparsers
add_parseradd_argumentset_defaultsr   ospathcurdirr   r   	TAGS_HELPr0   r$   r)   r,   )sZunpack_parserZrepack_parserZconvert_parserZtags_parserZinfo_parserZversion_parserZhelp_parserr   r@   r   parserU   sz    rO   intc               
   C  sj   t  } |  }t|ds"|   nDz|| W dS  tyd } zt|tjd W Y d }~n
d }~0 0 dS )Nr5   r   )filer	   )	rO   
parse_argshasattrr?   r5   r   r!   sysstderr)rA   r   r(   r   r   r   main   s    


$rV   )__doc__
__future__r   rD   rJ   rT   r   r   r   r   r   r   r$   r)   r,   r0   rM   rO   rV   r   r   r   r   <module>   s    			H