
    ,hc                        d dl Z d dlZdZd Zd Zd Zd Zd Z G d d	      Z G d
 d      Z	e	j                  D ]  Z ee	de e	j                           e	       Zd Z G d d      Zd Zd Zej&                  dk  reZyy)    NzPhttps://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.ymlc                  T    dt         j                  vry dd l} | j                  d       y )N	distutilsr   a  Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.)sysmoduleswarningswarn)r   s    Z/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/_distutils_hack/__init__.pywarn_distutils_presentr
   
   s%    #++%MM	?    c                     dt         j                  vry dd l} | j                  dt                t         j                  D cg c]  }|dk(  s|j                  d      r| }}|D ]  }t         j                  |=  y c c}w )Nr   r   zSetuptools is replacing distutils. Support for replacing an already imported distutils is deprecated. In the future, this condition will fail. Register concerns at z
distutils.)r   r   r   r   
report_url
startswith)r   namemodss      r	   clear_distutilsr      s    #++%MM	  !+|	- KK;$//,"? 	D 
  KKs   A<c                      t         j                  j                  dd      } | dk(  rddl}|j	                  dt
                | dk(  S )z?
    Allow selection of distutils by environment variable.
    SETUPTOOLS_USE_DISTUTILSlocalstdlibr   NzReliance on distutils from stdlib is deprecated. Users must rely on setuptools to provide the distutils module. Avoid importing distutils or import setuptools first, and avoid setting SETUPTOOLS_USE_DISTUTILS=stdlib. Register concerns at )osenvirongetr   r   r   )whichr   s     r	   enabledr   -   sN     JJNN5w?E$ %/<	1	
 Gr   c                     dd l } t                t               5  | j                  d       d d d        | j                  d      }d|j                  v sJ |j                         dt
        j                  vsJ y # 1 sw Y   NxY w)Nr   r   zdistutils.core
_distutilszsetuptools._distutils.log)	importlibr   shimimport_module__file__r   r   )r   cores     r	   ensure_local_distutilsr"   ?   sr    
 
 -,- ""#34D4==(7$--7&ckk999- -s   A88Bc                  B    t               rt                t                yy)z
    Ensure that the local copy of distutils is preferred over stdlib.

    See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
    for more motivation.
    N)r   r
   r"    r   r	   do_overrider%   P   s     y   r   c                       e Zd ZddZd Zy)
_TrivialReNc                     || _         y N)	_patterns)selfpatternss     r	   __init__z_TrivialRe.__init__]   s	    !r   c                 @    t        fd| j                  D              S )Nc              3   &   K   | ]  }|v  
 y wr)   r$   ).0patstrings     r	   	<genexpr>z#_TrivialRe.match.<locals>.<genexpr>a   s     ;S3&=;s   )allr*   )r+   r2   s    `r	   matchz_TrivialRe.match`   s    ;DNN;;;r   returnN)__name__
__module____qualname__r-   r5   r$   r   r	   r'   r'   \   s    "<r   r'   c                       e Zd ZddZd Zed        Zd Zed        Z	ed        Z
d Zej                  d	k  rg d
ZydgZy)DistutilsMetaFinderNc                     ||j                  d      sy  dj                  di t               }t        | |d       } |       S )Nztest.zspec_for_{fullname}c                       y r)   r$   r$   r   r	   <lambda>z/DistutilsMetaFinder.find_spec.<locals>.<lambda>l       r   r$   )r   formatlocalsgetattr)r+   fullnamepathtargetmethod_namemethods         r	   	find_speczDistutilsMetaFinder.find_spece   sG     H$7$7$@2+22>VX>{L9xr   c                    | j                         ry dd l}dd l}dd l}	 |j	                  d       G fdd|j                  j                        }|j                  j                  d |       j                        S # t
        $ r Y y w xY w)Nr   zsetuptools._distutilsc                       e Zd Z fdZd Zy)?DistutilsMetaFinder.spec_for_distutils.<locals>.DistutilsLoaderc                     d_         S )Nr   )r8   )r+   specmods     r	   create_modulezMDistutilsMetaFinder.spec_for_distutils.<locals>.DistutilsLoader.create_module   s    *
r   c                      y r)   r$   )r+   modules     r	   exec_modulezKDistutilsMetaFinder.spec_for_distutils.<locals>.DistutilsLoader.exec_module   s    r   N)r8   r9   r:   rP   rS   )rO   s   r	   DistutilsLoaderrL      s    r   rT   r   )origin)
is_cpythonr   importlib.abcimportlib.utilr   	ExceptionabcLoaderutilspec_from_loaderr    )r+   r   rT   rO   s      @r	   spec_for_distutilsz&DistutilsMetaFinder.spec_for_distutilso   s    ??	))*ABC	imm22 	 ~~..*3<< / 
 	
'  		 		s   A? ?	B
Bc                  @    t         j                  j                  d      S )zj
        Suppress supplying distutils for CPython (build and tests).
        Ref #2965 and #3007.
        zpybuilddir.txt)r   rE   isfiler$   r   r	   rV   zDistutilsMetaFinder.is_cpython   s     ww~~.//r   c                 p    t         j                  dk\  s| j                         ryt                d | _        y)zj
        Ensure stdlib distutils when running under pip.
        See pypa/pip#8761 for rationale.
              Nc                       y r)   r$   r$   r   r	   r?   z2DistutilsMetaFinder.spec_for_pip.<locals>.<lambda>   r@   r   )r   version_infopip_imported_during_buildr   r^   r+   s    r	   spec_for_pipz DistutilsMetaFinder.spec_for_pip   s.    
 w&$*H*H*J".r   c                 R     ddl }t         fd|j                  d      D              S )zO
        Detect if pip is being imported in a build script. Ref #2355.
        r   Nc              3   F   K   | ]  \  }}j                  |        y wr)   )frame_file_is_setup)r0   framelineclss      r	   r3   z@DistutilsMetaFinder.pip_imported_during_build.<locals>.<genexpr>   s%      
/:udC##E*
s   !)	tracebackany
walk_stack)ro   rp   s   ` r	   rg   z-DistutilsMetaFinder.pip_imported_during_build   s.    
 	 
>G>R>RSW>X
 
 	
r   c                 X    | j                   j                  dd      j                  d      S )zN
        Return True if the indicated frame suggests a setup.py file.
        r     zsetup.py)	f_globalsr   endswith)rm   s    r	   rl   z'DistutilsMetaFinder.frame_file_is_setup   s&     "":r2;;JGGr   c                 (    t                d | _        y)zp
        Ensure stdlib distutils when running select tests under CPython.

        python/cpython#91169
        c                       y r)   r$   r$   r   r	   r?   z>DistutilsMetaFinder.spec_for_sensitive_tests.<locals>.<lambda>   r@   r   N)r   r^   rh   s    r	   spec_for_sensitive_testsz,DistutilsMetaFinder.spec_for_sensitive_tests   s     	".r   )rc   
   )test.test_distutilsztest.test_peg_generatorztest.test_importlibr{   r)   )r8   r9   r:   rI   r^   staticmethodrV   ri   classmethodrg   rl   ry   r   rf   sensitive_testsr$   r   r	   r<   r<   d   s~    
B 0 0/ 
 
 H H/ g%	
  "
 r   r<   	spec_for_c                  L    t         t        j                  v xs t                y  y r)   )DISTUTILS_FINDERr   	meta_pathinsert_shimr$   r   r	   add_shimr      s    %66r   c                   ,    e Zd ZddZdedededdfdZy)	r   r7   Nc                     t                y r)   )r   rh   s    r	   	__enter__zshim.__enter__   s    r   excvaluetbc                     t                y r)   )_remove_shim)r+   r   r   r   s       r	   __exit__zshim.__exit__   s    r   r6   )r8   r9   r:   r   objectr   r$   r   r	   r   r      s(    F 6 v $ r   r   c                  L    t         j                  j                  dt               y )Nr   )r   r   insertr   r$   r   r	   r   r      s    MM,-r   c                  j    	 t         j                  j                  t               y # t        $ r Y y w xY wr)   )r   r   remover   
ValueErrorr$   r   r	   r   r      s,    -. s   #& 	22rb   )r   r   r   r
   r   r   r"   r%   r'   r<   r~   r   setattrry   r   r   r   r   r   rf   remove_shimr$   r   r	   <module>r      s    	 
 W 
($:"	!< <d dN  // D
D644 '( 7 . gK r   