a
    Te                     @  s<   d dl mZ d dlmZ ddlmZ dddddd	d
ZdS )    )annotations)Path   )	WheelFile.strNone)pathdestreturnc                 C  s   t | v}|jd}t|| }td| dddd |jD ]0}||| |jd? d@ }||j	
| q>W d	   n1 s0    Y  td
 d	S )zUnpack a wheel.

    Wheel content will be unpacked to {dest}/{name}-{ver}, where {name}
    is the package name and {ver} its version.

    :param path: The path to the wheel.
    :param dest: Destination directory (default to current directory).
    nameverzUnpacking to: z... T)endflush   i  NZOK)r   Zparsed_filenamegroupr   printZfilelistextractZexternal_attrjoinpathfilenamechmod)r	   r
   Zwfr   ZdestinationZzinfoZpermissions r   /lib/python3.9/site-packages/wheel/cli/unpack.pyunpack   s    	

2r   N)r   )Z
__future__r   pathlibr   Z	wheelfiler   r   r   r   r   r   <module>   s   