o
    Ëý°j{  ã                   @   sd   d dl mZmZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 d dl
Z
G dd„ dejeƒZdS )é    )ÚlogÚdir_utilN)ÚCommand)Ú
namespaces)Úunpack_archivec                   @   sB   e Zd ZdZdZdgZdd„ Zdd„ Zdd„ Zd	d
„ Z	dd„ Z
dS )Úinstall_egg_infoz.Install an .egg-info directory for the package)zinstall-dir=Údzdirectory to install toc                 C   s   d | _ d | _d | _d S ©N)Úinstall_dirÚinstall_layoutÚprefix_option©Úself© r   ú–/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/setuptools/command/install_egg_info.pyÚinitialize_options   s   
z#install_egg_info.initialize_optionsc                 C   sØ   |   dd¡ |   dd¡ tjdkr|   dd¡ |  d¡}t d d |j|j¡ ¡ d }| jrH| j 	¡ d	vr8t
d
ƒ‚| j 	¡ | _| dtj d¡}n| jsPdtjv rQn	| dtj d¡}|j| _tj | j|¡| _g | _d S )NÚinstall_lib)r
   r
   Úinstall)r   r   i  )r   r   Úegg_infoz	.egg-info©Údebz"unknown value for --install-layoutz-py%sÚ Úreal_prefix)Úset_undefined_optionsÚsysÚ
hexversionÚget_finalized_commandÚpkg_resourcesÚDistributionÚegg_nameÚegg_versionr   ÚlowerÚDistutilsOptionErrorÚreplaceÚPY_MAJORr   Ú__dict__r   ÚsourceÚosÚpathÚjoinr
   ÚtargetÚoutputs)r   Úei_cmdÚbasenamer   r   r   Úfinalize_options   s.   ÿ

ÿþ
z!install_egg_info.finalize_optionsc                 C   sœ   |   d¡ tj | j¡rtj | j¡stj| j| jd� ntj 	| j¡r1|  
tj| jfd| j ¡ | js:t | j¡ |  
| jdd| j| jf ¡ |  ¡  d S )Nr   )Údry_runz	Removing r   úCopying %s to %s)Úrun_commandr'   r(   Úisdirr*   Úislinkr   Úremove_treer/   ÚexistsÚexecuteÚunlinkr   Úensure_directoryÚcopytreer&   Úinstall_namespacesr   r   r   r   Úrun2   s   
ÿzinstall_egg_info.runc                 C   s   | j S r	   )r+   r   r   r   r   Úget_outputs?   s   zinstall_egg_info.get_outputsc                    s    ‡ fdd„}t ˆ jˆ j|ƒ d S )Nc                    sl   dD ]}|   |¡sd| | v r d S qˆ jr'ˆ jdv r'|   d¡r't d¡ d S ˆ j |¡ t d| |¡ |S )N)z.svn/zCVS/ú/r   zSOURCES.txtzSkipping SOURCES.txtr0   )Ú
startswithr   r   Úinfor+   ÚappendÚdebug)ÚsrcÚdstÚskipr   r   r   ÚskimmerD   s   ÿ
z*install_egg_info.copytree.<locals>.skimmer)r   r&   r*   )r   rE   r   r   r   r9   B   s   zinstall_egg_info.copytreeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚdescriptionÚuser_optionsr   r.   r;   r<   r9   r   r   r   r   r   
   s    ÿr   )Ú	distutilsr   r   r'   r   Ú
setuptoolsr   r   Úsetuptools.archive_utilr   r   Ú	Installerr   r   r   r   r   Ú<module>   s    