o
    g                     @   sX   d dl Z d dlmZmZ d dlmZ ddlmZ d dlm	Z	m
Z
 G dd dejeZdS )	    N)Command
namespaces)unpack_archive   )ensure_directory)dir_utillogc                   @   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 S N)install_dirself r   `/var/www/rescue_company/venv/lib/python3.10/site-packages/setuptools/command/install_egg_info.pyinitialize_options   s   
z#install_egg_info.initialize_optionsc                 C   sH   |  dd | d}|  d}|j| _tj| j|| _	g | _
d S )Ninstall_lib)r   r   egg_infoz	.egg-info)set_undefined_optionsget_finalized_command_get_egg_basenamer   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s9t| 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   copytreer   install_namespacesr   r   r   r   run   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                    sD   dD ]}|  |sd| | v r d S q j| td| | |S )N)z.svn/zCVS//r!   )
startswithr   appendr   debug)srcdstskipr   r   r   skimmer/   s   z*install_egg_info.copytree.<locals>.skimmer)r   r   r   )r   r4   r   r   r   r)   -   s   zinstall_egg_info.copytreeN)__name__
__module____qualname____doc__descriptionuser_optionsr   r   r+   r,   r)   r   r   r   r   r	      s    r	   )r   
setuptoolsr   r   setuptools.archive_utilr   _pathr   	distutilsr   r   	Installerr	   r   r   r   r   <module>   s    