o
    UhM                     @  sF   d Z ddlmZ ddlZdd Zdd Zdd	 Zed
kr!e  dS dS )z=Inspect a target Python interpreter virtual environment wise.    )annotationsNc                 C  sT   | d u rd S t | ttfst | trt| ntt| } t | tr(| t } | S )N)
isinstancestrbytestypereprdecodesysgetfilesystemencodingvalue r   k/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/virtualenv/create/debug.pyencode_path   s   
r   c                 C  s   dd | D S )Nc                 S  s   g | ]}t |qS r   )r   ).0ir   r   r   
<listcomp>   s    z$encode_list_path.<locals>.<listcomp>r   r   r   r   r   encode_list_path   s   r   c               
   C  s  zddl m}  W n ty   t} Y nw | d|  fg}d}|D ]}tt|d}t|tr1t|nt	|}||d |< q t
 |d d< ttjdd|d d< tj|d	< zddl}t|d
t|dd}t	| |d< W n	 tyt   Y nw ddl}t||d< zddl}t||d< W n ty }	 zt|	|d< W Y d}	~	nd}	~	ww zddl}
t|
|d< W n ty }	 zt|	|d< W Y d}	~	nd}	~	ww zddl}t||d< W n ty }	 zt|	|d< W Y d}	~	nd}	~	ww zddl}t||d< W n ty }	 zt|	|d< W Y d}	~	dS d}	~	ww z|j|dd}tj| W dS  ttfyH }	 ztjt|	 tjt| tdd}	~	ww )z/Print debug data about the virtual environment.r   )OrderedDictr	   )	
executable_base_executableprefixbase_prefixreal_prefixexec_prefixbase_exec_prefixpath	meta_pathNfs_encodingencodingio_encodingversionget_makefile_filename_get_makefile_filenamemakefile_filenameossitedatetimemathjson   )indent   )collectionsr   ImportErrordictgetattrr	   r   listr   r   r
   stdoutr!   	sysconfigr%   r   r&   r'   r(   r)   dumpswrite
ValueError	TypeErrorstderr
SystemExit)r   result	path_keyskeyr   r3   makefiler%   r&   	exceptionr'   r(   r)   contentr   r   r   run   sx   
r@   __main__)__doc__
__future__r   r	   r   r   r@   __name__r   r   r   r   <module>   s    
O
