o
    Uh                     @  sb   d dl mZ d dlZd dlZd dlZd dlmZmZ ee	Z
dd Zdd Zdd	 ZddgZdS )
    )annotationsN)IS_WINROOTc              	   C  s   t | }ttd,}||}| dW  d    W  d    S 1 s)w   Y  W d    d S 1 s9w   Y  d S )Nrzutf-8)_get_path_within_zipzipfileZipFiler   openreaddecode)	full_pathsub_filezip_filefile_handler r   j/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/virtualenv/util/zipapp.pyr
      s   Rr
   c                 C  sl   t d| | t| }ttd}||}|j|_|	|t
|j W d    d S 1 s/w   Y  d S )Nzextract %s to %sr   )LOGGERdebugr   r   r   r   getinfonamefilenameextractstrparent)r   destr   r   infor   r   r   r      s   
"r   c                 C  sp   t jt jt| } t t j }| |s%d|  d| d}t|| t	|d  }t
r6|t jd}|S )Nz
full_path=z should start with prefix=./)ospathrealpathabspathr   r   sep
startswithRuntimeErrorlenr   replace)r   prefixmsgr   r   r   r   r      s   
r   )
__future__r   loggingr   r   virtualenv.infor   r   	getLogger__name__r   r
   r   r   __all__r   r   r   r   <module>   s    
	