
    i                         S r SSKrSSKr\R                  R	                  \5      rS rSr " S S5      r	\R                  R                  S\	" 5       5        g)z?Patches that are applied at runtime to the virtual environment.    Nc                 ^   ^ U R                   R                  mU4S jnXR                   l        g)a  
Distutils allows user to configure some arguments via a configuration file:
https://docs.python.org/3.11/install/index.html#distutils-configuration-files.

Some of this arguments though don't make sense in context of the virtual environment files, let's fix them up.
c                   > T" U /UQ70 UD6nU R                  S5      nSU;   a6  [        [        R                  R	                  [
        R                  5      4US'   S H!  nSU 3nXd;   d  M  UR                  US 5        M#     U$ )Ninstallprefix)purelibplatlibheadersscriptsdatainstall_)get_option_dictVIRTUALENV_PATCH_FILEospathabspathsysr   pop)selfargskwargsresultr   basekeyold_parse_config_filess          IC:\Users\dbart\PlayPalace11\server\.venv\Lib\site-packages\_virtualenv.pyparse_config_files&patch_dist.<locals>.parse_config_files   s    '>t>v>&&y1w 5rwwszz7R RGHHDTF#C~C& I     N)Distributionr   )distr   r   s     @r   
patch_distr!   	   s*     "..AA
 ,>(r   )zdistutils.distzsetuptools.distc                   J    \ rS rSrSrSr/ rSS jr\S 5       r	\S 5       r
Srg)	_Finder(   zGA meta path finder that allows patching the imported distutils modules.Nc           	         U[         ;   Ga  U R                  Gc  [        U R                  5      S:X  a/  SS KnUR                  5       nU R                  R                  U5        SSKJn  SSK	J
n  U R                  S      Xl         U" X5      nUb  [        UR                  S5      n	U	(       a  SOSn
[        UR                  U
5      nU	(       a  U R                  OU R                  nXLa   [!        UR                  X" X5      5        US U l        sS S S 5        $  S U l         S S S 5        g g ! ["         a     N1f = f! S U l        f = f! , (       d  f       g = f)Nr   )partial)	find_specexec_moduleload_module)_DISTUTILS_PATCHfullnamelenlock	threadingLockappend	functoolsr&   importlib.utilr'   hasattrloadergetattrr(   r)   setattrAttributeError)r   r+   r   targetr.   r-   r&   r'   spec
is_new_api	func_nameoldfuncs                r   r'   _Finder.find_spec2   s%   ''DMM,A499~"  ~~' 		  &)01 ()$X4D'%,T[[-%H
5?M]	%dkk9=3=t//4CSCS?% 'Y@R S  $$(DM#  ( %)DM# $  $2 % $% %)DM# $ sO   =EA%D<+D,D<EE,
D96D<8D99D<<	EE
Ec                 T    U " U5        UR                   [        ;   a  [        U5        g g N__name__r*   r!   )r<   modules     r   r(   _Finder.exec_moduleW   s#    F??..v /r   c                 T    U " U5      nUR                   [        ;   a  [        U5        U$ r@   rA   )r<   namerC   s      r   r)   _Finder.load_module]   s%    T??..vr   )r+   r@   )rB   
__module____qualname____firstlineno____doc__r+   r-   r'   staticmethodr(   r)   __static_attributes__ r   r   r#   r#   (   s?    QH
 D#J  
  r   r#   )rK   r   r   r   join__file__r   r!   r*   r#   	meta_pathinsertrN   r   r   <module>rS      sQ    E 	 
X. >6 7 : :z   Q	 "r   