o
    Ëý°j*  ã                   @   s|   d dl mZ d dlZd dlZd dlZd dlZd dlm  mZ	 d dl
Z
e	jZG dd„ de	jƒZdd„ e	jjD ƒej e_dS )é    )ÚDistutilsArgErrorNc                   @   s„   e Zd ZdZejjddg Zejjddg Zddd„ fd	d
d„ fgZe	eƒZ
dd„ Zdd„ Zdd„ Zdd„ Zedd„ ƒZdd„ ZdS )Úinstallz7Use easy_install to install the package, w/dependencies)úold-and-unmanageableNzTry not to use this!)ú!single-version-externally-managedNz5used by system package builders to create 'flat' eggsr   r   Úinstall_egg_infoc                 C   ó   dS ©NT© ©Úselfr	   r	   ú�/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/setuptools/command/install.pyÚ<lambda>   ó    zinstall.<lambda>Úinstall_scriptsc                 C   r   r   r	   r
   r	   r	   r   r      r   c                 C   s*   t  dtj¡ tj | ¡ d | _d | _d S )NzRsetup.py install is deprecated. Use build and pip and other standards-based tools.)	ÚwarningsÚwarnÚ
setuptoolsÚSetuptoolsDeprecationWarningÚorigr   Úinitialize_optionsÚold_and_unmanageableÚ!single_version_externally_managedr
   r	   r	   r   r       s   ý
zinstall.initialize_optionsc                 C   sB   t j | ¡ | jrd| _d S | jr| js| jstdƒ‚d S d S d S )NTzAYou must specify --record or --root when building system packages)r   r   Úfinalize_optionsÚrootr   Úrecordr   r
   r	   r	   r   r   ,   s   
ÿþzinstall.finalize_optionsc                 C   s(   | j s| jrtj | ¡S d | _d| _d S )NÚ )r   r   r   r   Úhandle_extra_pathÚ	path_fileÚ
extra_dirsr
   r	   r	   r   r   7   s   
zinstall.handle_extra_pathc                 C   sB   | j s| jrtj | ¡S |  t ¡ ¡stj | ¡ d S |  ¡  d S )N)	r   r   r   r   ÚrunÚ_called_from_setupÚinspectÚcurrentframeÚdo_egg_installr
   r	   r	   r   r   A   s
   zinstall.runc                 C   sz   | du rd}t  |¡ t ¡ dkrd}t  |¡ dS t | ¡d }|dd… \}t |¡}|j dd	¡}|d
ko<|j	dkS )añ  
        Attempt to detect whether run() was called from setup() or by another
        command.  If called by setup(), the parent caller will be the
        'run_command' method in 'distutils.dist', and *its* caller will be
        the 'run_commands' method.  If called any other way, the
        immediate caller *might* be 'run_command', but it won't have been
        called by 'run_commands'. Return True in that case or if a call stack
        is unavailable. Return False otherwise.
        Nz4Call stack not available. bdist_* commands may fail.Ú
IronPythonz6For best results, pass -X:Frames to enable call stack.Té   é   Ú__name__r   zdistutils.distÚrun_commands)
r   r   ÚplatformÚpython_implementationr!   ÚgetouterframesÚgetframeinfoÚ	f_globalsÚgetÚfunction)Ú	run_frameÚmsgÚresÚcallerÚinfoÚcaller_moduler	   r	   r   r    L   s   


þzinstall._called_from_setupc                 C   sŒ   | j  d¡}|| j d| j| jd�}| ¡  d|_|j t d¡¡ |  	d¡ | j  
d¡jg}tjr8| dtj¡ ||_|jdd	� d t_d S )
NÚeasy_installÚx)Úargsr   r   Ú.z*.eggÚ	bdist_eggr   F)Úshow_deprecation)ÚdistributionÚget_command_classr   r   Úensure_finalizedÚalways_copy_fromÚpackage_indexÚscanÚglobÚrun_commandÚget_command_objÚ
egg_outputr   Úbootstrap_install_fromÚinsertr8   r   )r   r6   Úcmdr8   r	   r	   r   r#   g   s   ÿ

zinstall.do_egg_installN)r'   Ú
__module__Ú__qualname__Ú__doc__r   r   Úuser_optionsÚboolean_optionsÚnew_commandsÚdictÚ_ncr   r   r   r   Ústaticmethodr    r#   r	   r	   r	   r   r      s(    þÿ

þ

r   c                 C   s   g | ]}|d  t jvr|‘qS )r   )r   rP   )Ú.0rH   r	   r	   r   Ú
<listcomp>‚   s    rS   )Údistutils.errorsr   r!   rB   r   r)   Údistutils.command.installÚcommandr   r   r   Ú_installÚsub_commandsrN   r	   r	   r	   r   Ú<module>   s    sÿÿ