o
    LK&h                     @  s   d dl mZ d dlZd dlZd dlmZ d dlmZmZm	Z	 ddl
mZ ddlmZmZ d dlm  mZ d dlmZ erDd	d
lmZ ndZdddZG dd dejZdd ejjD ej e_dS )    )annotationsN)Callable)TYPE_CHECKINGAnyClassVar   )Distribution)SetuptoolsDeprecationWarningSetuptoolsWarning)DistutilsArgError   )easy_installnamestrc                 C  s0   | dkrt jddd tjS tdtd| )N_installzk`setuptools.command._install` was an internal implementation detail that was left in for numpy<1.9 support.)     r   )due_datezmodule z has no attribute )r	   emitoriginstallAttributeError__name__)r    r   M/var/www/html/venv/lib/python3.10/site-packages/setuptools/command/install.py__getattr__   s   r   c                      s   e Zd ZU dZded< ejjddg Zejjddg Zdd	d
 fddd
 fgZ	ded< e
e	Z fddZd fddZdd Zedd Z  ZS )r   z7Use easy_install to install the package, w/dependenciesr   distribution)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 NTr   selfr   r   r   <lambda>4       zinstall.<lambda>install_scriptsc                 C  r    r!   r   r"   r   r   r   r$   5   r%   z8ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]new_commandsc                   s,   t jddddd t   d | _d | _d S )Nzsetup.py install is deprecated.z
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.
            zAhttps://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)r   
      )see_urlr   )r	   r   superinitialize_optionsold_and_unmanageable!single_version_externally_managedr"   	__class__r   r   r,   9   s   

zinstall.initialize_optionsreturnNonec                   s@   t    | 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+   finalize_optionsrootr.   recordr   r"   r/   r   r   r3   I   s   

zinstall.finalize_optionsc                 C  s(   | j s| jrtj| S d | _d| _d S )N )r4   r.   r   r   handle_extra_path	path_file
extra_dirsr"   r   r   r   r7   S   s
   zinstall.handle_extra_pathc                 C  s   | du rd}t | t dkrd}t | dS t| }|dd D ])}|dd \}t|}|jd	d
}|dkrD|j	dkrDq%|dkoL|j	dk  S d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.Tr      r   r   r6   zsetuptools.distrun_commandzdistutils.distrun_commandsF)
r
   r   platformpython_implementationinspectgetouterframesgetframeinfo	f_globalsgetfunction)	run_framemsgframesframecallerinfocaller_moduler   r   r   _called_from_setup^   s    



zinstall._called_from_setup)r1   r2   )r   
__module____qualname____doc____annotations__r   r   user_optionsboolean_optionsr'   dict_ncr,   r3   r7   staticmethodrM   __classcell__r   r   r/   r   r       s(   
 


r   c                 C  s   g | ]}|d  t jvr|qS )r   )r   rU   ).0cmdr   r   r   
<listcomp>   s    rZ   )r   r   )
__future__r   r@   r>   collections.abcr   typingr   r   r   distr   warningsr	   r
   distutils.command.installcommandr   r   distutils.errorsr   r   easy_install_clsr   sub_commandsr'   r   r   r   r   <module>   s&    
a
