
    9
g                    |   d dl mZ d dlZd dlZd dlZd dlmZ d dlmZm	Z	m
Z
mZ d dlZddlmZ ddlmZmZ dd	lmZ d dlmc mZ d d
lmZ erddlmZ ndZddZ G d dej,                        Zej,                  j:                  D  cg c]  } | d    ej<                  vs|  c} ej>                  z   e_        yc c} w )    )annotationsN)Callable)TYPE_CHECKINGAnyClassVarcast   )Distribution)SetuptoolsDeprecationWarningSetuptoolsWarning   )	bdist_egg)DistutilsArgError)easy_installc                    | dk(  r't        j                  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.)i     r	   )due_datezmodule z has no attribute )r   emitoriginstallAttributeError__name__)names    Z/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/setuptools/command/install.py__getattr__r      sE    z$))8!	

 ||
78,.@I
JJ    c                       e Zd ZU dZded<   ej                  j                  ddgz   Zej                  j                  ddgz   Zdd	 fd
d fgZ	ded<    e
e	      Z fdZd fdZd Z fdZed        ZddZ x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                     yNT selfs    r   <lambda>zinstall.<lambda>8   s    $r   install_scriptsc                     yr$   r%   r&   s    r   r(   zinstall.<lambda>9   s    r   z8ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]new_commandsc                n    t        j                  ddd       t        |           d | _        d | _        y )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)see_url)r   r   superinitialize_optionsold_and_unmanageable!single_version_externally_managedr'   	__class__s    r   r/   zinstall.initialize_options=   s<    $))-
 X	
 	"$$(!15.r   c                    t         |           | j                  rd| _        y | j                  r%| j                  s| j                  st        d      y y y )NTzAYou must specify --record or --root when building system packages)r.   finalize_optionsrootr1   recordr   r2   s    r   r5   zinstall.finalize_optionsO   sO     "9959D23399T[['W  &19 4r   c                    | j                   s| j                  rt        j                  j	                  |       S d | _        d| _        y )N )r6   r1   r   r   handle_extra_path	path_file
extra_dirsr&   s    r   r:   zinstall.handle_extra_pathY   s9    99>><<11$77 r   c                    | j                   s| j                  rt        |          S | j	                  t        j                               st        |           y | j                          y )N)r0   r1   r.   run_called_from_setupinspectcurrentframedo_egg_installr2   s    r   r>   zinstall.rund   sV    $$(N(N7;= &&w';';'=>GKM  !r   c                   | Fd}t        j                  |       t        j                         dk(  rd}t        j                  |       yt	        j
                  |       }|dd D ]f  }|dd \  }t	        j                  |      }|j                  j                  d	d
      }|dk(  r|j                  dk(  rP|dk(  xr |j                  dk(  c S  y)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   r9   zsetuptools.distrun_commandzdistutils.distrun_commandsF)
r   r   platformpython_implementationr@   getouterframesgetframeinfo	f_globalsgetfunction)	run_framemsgframesframecallerinfocaller_modules          r   r?   zinstall._called_from_setupq   s     HC""3'--/<?N!&&s+''	2Aa[Ebq	IV''/D",,00R@M 11dmm}6T $44X.9XX ! r   c           	     j   | j                   j                  d      }t        t         || j                   d| j                  | j
                              }|j                          d|_        |j                  j                  t        j                  d             | j                  d       t        t        | j                   j                  d            }|j                  g}t        j                   r |j#                  dt        j                          ||_        |j'                  d	       d t        _        y )
Nr   x)argsr6   r7   .z*.eggr   r   F)show_deprecation)r   get_command_classr   easy_install_clsr6   r7   ensure_finalizedalways_copy_frompackage_indexscanglobrF   bdist_egg_clsget_command_obj
egg_output
setuptoolsbootstrap_install_frominsertrX   r>   )r'   r   cmdr   rX   s        r   rB   zinstall.do_egg_install   s    ((::>J !!YY{{	
 	" 	tyy12%(9(9(I(I+(VW	$$%,,KK:<<=',0
)r   )returnNone)r   
__module____qualname____doc____annotations__r   r   user_optionsboolean_optionsr+   dict_ncr/   r5   r:   r>   staticmethodr?   rB   __classcell__)r3   s   @r   r   r   $   s    A<<,,>	
0 L ll22+6 O 
./	-.NLJ  |
C6$	  @1r   r   )r   str) 
__future__r   ra   r@   rH   collections.abcr   typingr   r   r   r   re   distr
   warningsr   r   r   rb   distutils.command.installcommandr   r   distutils.errorsr   r   r\   r   sub_commandsrr   r+   )rh   s   0r   <module>r      s    "    $ 5 5   F 1 ( ( .>KM1dll M1d <<,,,CAgkk0IC,  s   B9B9