o
    5‘ðiÊ  ã                   @  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   úY/root/parts/websockify/install/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ÿ
þ