
    *,hz                        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Zd dlZd dl	Z	d dl
Z
d dlZd dlZd dlZd dlZd dlZd dlZddlmZmZ ddlmZmZmZmZmZ ddlmZ ddlmZmZmZm Z  dd	l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ dd
l,m-Z-m.Z.  e	j^                  e0      Z1da2 e3ed      rdZ4n2ejj                  jm                  d      rdZ4nejj                  dk(  rdZ4ndZ4 ejn                  d      Z8e8sdejr                  dd z  Z8de8z   Z:e4e8z   Z; e+       jy                  dd      jy                  dd      Z= ejn                  d      Z>e>r6e>jm                  d      r%e>jy                  dd      j                  d      d    Z>nd Z@ e@       Z>[@ ej                  dej                  ej                  z        ZD ej                  dej                  ej                  z        ZE ej                  d      ZF ej                  d      ZGd ZHd!ZIe
j                  d"k(  rd# ZKnd$ ZKejr                  d    d%k  rd dlLZLn
dZLd dlMZNd dlOZNd& ZPd' ZQ G d( d)eR      ZS eS       ZT G d* d+eR      ZUd, ZVd- ZW eW       ZX[Wd/d.ZYy)0    )unicode_literalsN)message_from_file   )__version__DistlibException)	sysconfigZipFilefsdecode	text_typefilter)InstalledDistribution)MetadataMETADATA_FILENAMEWHEEL_METADATA_FILENAMELEGACY_METADATA_FILENAME)
FileOperatorconvert_path	CSVReader	CSVWriterCachecached_propertyget_cache_baseread_exportstempdirget_platform)NormalizedVersionUnsupportedVersionErrorpypy_version_infoppjavajycliipcppy_version_nodotz%s%s   py-_.SOABIzcpython-c                     dt         g} t        j                  d      r| j                  d       t        dk(  rt
        j                  d d }|dk  rqt        j                  d      }|d}|r| j                  d       |d	k  r@t        j                  d
      }|dk(  s|$t
        j                  dk(  r| j                  d       dj                  |       S )Nr$   Py_DEBUGdr&   )      WITH_PYMALLOCTm)r/   r/   Py_UNICODE_SIZE   i u )	
VER_SUFFIXr   get_config_varappend
IMP_PREFIXsysversion_info
maxunicodejoin)partsviwpmuss       [/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py_derive_abirD   ;   s    z"##J/LL!!"1%BF{..?;CLL%;"112CDBQw2:#..H2LS)wwu~    zz
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+(\.\w+)*)
\.whl$
z7
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
s   \s*#![^\r\n]*s   ^(\s*#!("[^"]+"|\S+))\s+(.*)$s   #!pythons	   #!pythonw/c                     | S N os    rC   <lambda>rL   e   s     rE   c                 B    | j                  t        j                  d      S )NrF   )replaceosseprJ   s    rC   rL   rL   g   s    2663/ rE   r/   c                      t         r%t        j                         D  cg c]  } | d   	 c} S t        j                  j                  S c c} w )Nr   )impget_suffixes	importlib	machineryEXTENSION_SUFFIXES)ss    rC   _get_suffixesrX   p   s:    
!..01!11""555 2s   Ac                    t         rt        j                  | |      S t        j                  j	                  | |      }t        j                  j                  |      }|t        j                  | <   |j                  j                  |       |S rH   )
rR   load_dynamicrT   utilspec_from_file_locationmodule_from_specr;   modulesloaderexec_module)namepathspecmodules       rC   _load_dynamicre   v   sg    
d++~~55dDA006"D'rE   c                   ,    e Zd Zd Zd Zd ZddZd Zy)Mounterc                      i | _         i | _        y rH   )impure_wheelslibsselfs    rC   __init__zMounter.__init__   s    	rE   c                 X    || j                   |<   | j                  j                  |       y rH   )ri   rj   update)rl   pathname
extensionss      rC   addzMounter.add   s$    '18$		$rE   c                     | j                   j                  |      }|D ]!  \  }}|| j                  v s| j                  |= # y rH   )ri   poprj   )rl   rp   rq   kvs        rC   removezMounter.remove   sA    ''++H5
 	!DAqDII~IIaL	!rE   Nc                 .    || j                   v r| }|S d }|S rH   )rj   )rl   fullnamerb   results       rC   find_modulezMounter.find_module   s&    tyy F  FrE   c                     |t         j                  v rt         j                  |   }|S || j                  vrt        d|z        t	        || j                  |         }| |_        |j                  dd      }t        |      dkD  r
|d   |_        |S )Nzunable to find extension for %sr*   r   r   )	r;   r^   rj   ImportErrorre   
__loader__rsplitlen__package__)rl   ry   rz   r?   s       rC   load_modulezMounter.load_module   s    s{{"[[*F  tyy(!"Ch"NOO"8TYYx-@AF $FOOC+E5zA~%*1X"rE   rH   )__name__
__module____qualname__rm   rr   rw   r{   r   rI   rE   rC   rg   rg      s    %!rE   rg   c                       e Zd ZdZdZdZddZed        Zed        Z	ed        Z
ed	        Zd
 Zed        Zd ZddZd Zd Zd ZddZd Zd Zd Zd Zd Zd ZddZd Zd ZddZy) Wheelz@
    Class to build and install from Wheel files (PEP 427).
    )r   r   sha256Nc                    || _         || _        d| _        t        g| _        dg| _        dg| _        t        j                         | _	        | d| _
        d| _        | j                  | _        yt        j                  |      }|rQ|j!                  d      }|d   | _
        |d   j#                  d	d
      | _        |d   | _        | j                  | _        yt        j$                  j'                  |      \  }}t(        j                  |      }|st+        d|z        |r$t        j$                  j-                  |      | _	        || _        |j!                  d      }|d   | _
        |d   | _        |d   | _        |d   j'                  d      | _        |d   j'                  d      | _        |d   j'                  d      | _        y)zB
        Initialise an instance using a (valid) filename.
        r6   noneanyNdummyz0.1nmvnr)   r(   bnzInvalid name or filename: %rr'   r*   biar)signshould_verifybuildverPYVERpyverabiarchrO   getcwddirnamera   versionfilename	_filenameNAME_VERSION_REmatch	groupdictrN   rb   splitFILENAME_REr   abspath)rl   r   r   verifyr2   infor   s          rC   rm   zWheel.__init__   s    	#W
8G	yy{DI DL!]]DN%%h/A{{2 J	#Dz11#s; $T
!%$&GGMM($;!%%h/* ,:<D,E F F#%77??7#;DL!){{2 J	#Dz $T
!$Z--c2
:++C0 J,,S1	rE   c                 R   | j                   rd| j                   z   }nd}dj                  | j                        }dj                  | j                        }dj                  | j                        }| j
                  j                  dd      }| j                  d||d|d|d|dS )zJ
        Build and return a filename from the various components.
        r(   r6   r*   r)   .whl)r   r>   r   r   r   r   rN   ra   )rl   r   r   r   r   r   s         rC   r   zWheel.filename   s    
 ==T]]*HH$hhtxx xx		",,&&sC0)-GX).T; 	;rE   c                     t         j                  j                  | j                  | j                        }t         j                  j                  |      S rH   )rO   rb   r>   r   r   isfile)rl   rb   s     rC   existszWheel.exists   s1    ww||DLL$--8ww~~d##rE   c              #      K   | j                   D ]+  }| j                  D ]  }| j                  D ]	  }|||f   - y wrH   )r   r   r   )rl   r   r   r   s       rC   tagsz
Wheel.tags   sL     ZZ 	+Exx + II +Dd**++	+s   <>c           	         t         j                  j                  | j                  | j                        }| j
                  d| j                  }d|z  }t        j                  d      }t        |d      5 }| j                  |      }|d   j                  dd      }t        |D cg c]  }t        |       c}      }	t        t        g}
d }|
D ]U  }	 t!        j                  ||      }|j#                  |      5 } ||      }t%        |      }|r	 d d d         n	 d d d        W |st)        d	d
j                  |
      z        	 d d d        |S c c}w # 1 sw Y   :xY w# t&        $ r Y w xY w# 1 sw Y   S xY w)Nr(   %s.dist-infoutf-8rWheel-Versionr*   r   )fileobjz8Invalid wheel, because metadata is missing: looked in %sz, )rO   rb   r>   r   r   ra   r   codecs	getreaderr	   get_wheel_metadatar   tupleintr   r   	posixpathopenr   KeyError
ValueError)rl   rp   name_verinfo_dirwrapperzfwheel_metadatawvifile_versionfnsrz   fnmetadata_filenamebfwfs                   rC   metadatazWheel.metadata   s   77<<dmm<"ii6!H,""7+Xs# 	Kr!44R8N066sA>B "!5Q#a&!56L +,DECF 	(1x(D%!23 "r$R[!)"!5!!	" " ""	   "9;?99S>"J K K +	K0 + "6" "
   '	K0 sf   60E1&E
8E1'E":EE"E1E"%!E1E1EE""	E.+E1-E..E11E;c                 0   | j                   d| j                  }d|z  }t        j                  |d      }|j	                  |      5 } t        j                  d      |      }t        |      }d d d        t        |      S # 1 sw Y   t              S xY w)Nr(   r   WHEELr   )	ra   r   r   r>   r   r   r   r   dict)rl   r   r   r   r   r   r   messages           rC   r   zWheel.get_wheel_metadata  s    "ii6!H,%NN8W=WW&' 	,2*!!'*2.B'+G	, G}	, G}s   'BBc                     t         j                  j                  | j                  | j                        }t        |d      5 }| j                  |      }d d d        |S # 1 sw Y   S xY w)Nr   )rO   rb   r>   r   r   r	   r   )rl   rp   r   rz   s       rC   r   z
Wheel.info  sT    77<<dmm<Xs# 	1r,,R0F	1	1s   AA'c                    t         j                  |      }|ru|j                         }|d | ||d  }}d|j                         v rt        }nt
        }t        j                  |      }|rd|j                         d   z   }nd}||z   }||z   }|S |j                  d      }|j                  d      }	|dk  s||	kD  rd}
n|||dz    d	k(  rd	}
nd}
t
        |
z   |z   }|S )
Ns   pythonw    rE         
r   r&   s   
)	
SHEBANG_REr   endlowerSHEBANG_PYTHONWSHEBANG_PYTHONSHEBANG_DETAIL_REgroupsfind)rl   datar2   r   shebangdata_after_shebangshebang_pythonargscrlfterms              rC   process_shebangzWheel.process_shebang%  s    T"%%'C*.t*d34j'GW]]_,!0!/!''0Aahhjn,$t+G//D  5!B5!BAvb26?g-"D D!D(4/DrE   c                    || j                   }	 t        t        |      } ||      j                         }t        j                  |      j                  d      j                  d      }||fS # t        $ r t	        d|z        w xY w)NzUnsupported hash algorithm: %r   =ascii)
	hash_kindgetattrhashlibAttributeErrorr   digestbase64urlsafe_b64encoderstripdecode)rl   r   r   hasherrz   s        rC   get_hashzWheel.get_hashC  s    I	QWi0F $$&))&188>EEgN&  	  	Q"#Ci#OPP	Qs   A- -Bc                     t        |      }|j                  |ddf       t        |      5 }|D ]  }|j                  |        	 d d d        y # 1 sw Y   y xY w)Nr6   )listr9   r   writerow)rl   recordsrecord_patharchive_record_pathwriterrows         rC   write_recordzWheel.write_recordN  sY    w-+R45{# 	%v %$%	% 	% 	%s   AAc                 (   g }|\  }}t        t        | j                        }|D ]q  \  }}	t        |	d      5 }
|
j	                         }d d d        d| j                        z  }t        j                  j                  |	      }|j                  |||f       s t        j                  j                  |d      }	t        t        j                  j                  |d            }| j                  ||	|       |j                  ||	f       y # 1 sw Y   xY w)Nrbz%s=%sRECORD)r   r   r   r   readr   rO   rb   getsizer9   r>   to_posixr   )rl   r   libdirarchive_pathsr   distinfor   r   appfr   r   sizes                 rC   write_recordszWheel.write_recordsU  s    !($..1" 	/EBa  !vvx t}}T22F77??1%DNNB-.	/ GGLL8,bggll8X67'1b)b!W%   s   DD	c                     t        |dt        j                        5 }|D ].  \  }}t        j	                  d||       |j                  ||       0 	 d d d        y # 1 sw Y   y xY w)NwzWrote %s to %s in wheel)r	   zipfileZIP_DEFLATEDloggerdebugwrite)rl   rp   r  r   r  r  s         rC   	build_zipzWheel.build_zipe  s\    XsG$8$89 	 R&  A62>B 	  	  	 s   4AA#c           
      
   |i }t        t        fdd            d   }|dk(  rd}t        g}t        g}t        g}nd}t
        g}dg}d	g}|j                  d
|      | _        |j                  d|      | _        |j                  d|      | _	        |   }	| j                  d| j                  }
d|
z  }d|
z  }g }dD ]N  }|vr	|   }t        j                  j                  |      s.t        j                  |      D ]  \  }}}|D ]  }t!        t        j                  j#                  ||            }t        j                  j%                  ||      }t'        t        j                  j#                  |||            }|j)                  ||f       |dk(  s|j+                  d      rt-        |d      5 }|j/                         }ddd       | j1                        }t-        |d      5 }|j3                  |       ddd         Q |	}d}t        j                  |      D ]  \  }}}||k(  r]t5        |      D ]F  \  }}t!        |      }|j+                  d      s#t        j                  j#                  ||      }||=  n |sJ d       |D ]y  }t!        |      j+                  d      rt        j                  j#                  ||      }t'        t        j                  j%                  ||            }|j)                  ||f       {  t        j6                  |      }|D ]l  }|dvst!        t        j                  j#                  ||            }t'        t        j                  j#                  ||            }|j)                  ||f       n d|xs | j8                  z  dt:        z  d|z  g}| j<                  D ]   \  }}}|j)                  d|d|d|       " t        j                  j#                  |d      }t-        |d      5 }|j3                  dj#                  |             ddd       t'        t        j                  j#                  |d            }|j)                  ||f       d  } t?        || !      }| jA                  ||f|	|       t        j                  j#                  | jB                  | jD                        }!| jG                  |!|       |!S # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w)"z
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        Nc                     | v S rH   rI   )rK   pathss    rC   rL   zWheel.build.<locals>.<lambda>s  s    qEz rE   )purelibplatlibr   r  falsetruer   r   r   r   r   r(   %s.datar   )r   headersscriptsr  .exer   wb
.dist-infoz(.dist-info directory expected, not found)z.pycz.pyo)r   	INSTALLERSHAREDr   zWheel-Version: %d.%dzGenerator: distlib %szRoot-Is-Purelib: %szTag: r   r  
c                 H    | d   }|j                  d      }d|v r|dz  }||fS )Nr   rF   r  i'  )count)tr  ns      rC   sorterzWheel.build.<locals>.sorter  s2    1BAr!U
r7NrE   )key)$r   r   IMPVERABIARCHr   getr   r   r   ra   r   rO   rb   isdirwalkr
   r>   relpathr  r9   endswithr   r   r   r  	enumeratelistdirwheel_versionr   r   sortedr	  r   r   r  )"rl   r  r   r2  libkeyis_puredefault_pyverdefault_abidefault_archr  r   data_dirr   r  r'  rb   rootdirsfilesr   r  rpr  r  r   r  r   dnr   r   r   r   r&  rp   s"    `                                rC   buildzWheel.buildk  s   
 <Df13IJKANYG#HM%K 6LG"GM!(K!7LXXg}5
88E;/HHV\2	v"ii6x'!H, 2 	.C%:Dww}}T")+ .%D$# 
.$RWW\\$%;<WW__Q5%bggll8S"&EF%,,b!W5)+AJJv4F!%a 0!'(vvx0#'#7#7#=D!%a .! !. .
..	.( !# 	.D$t| 't_ EAr!"B{{<0#%77<<b#9 G  K!KK .B<(()9:GGLLr*bggooa67$$b!W-.	.* 

8$ 	.BCCRWW\\(B78bggll8R89$$b!W-		. #m&It7I7IJ#k1!G+

 !%		 	HE3!!UC"FG	HGGLL7+!S\ 	/QGGDIIn-.	/bggll8W56b!W%	 }&9 	Hh/G77<<dmm<x/K0 0. .V	/ 	/s$   :S'	0S4	!T'S14S>T
c                 $    |j                  d      S )zl
        Determine whether an archive entry should be skipped when verifying
        or installing.
        )rF   z/RECORD.jws)r/  )rl   arcnames     rC   
skip_entryzWheel.skip_entry  s      455rE   c           	         |j                   }|j                  d      }|j                  dd      }|j                  dd      }t        j                  j	                  | j
                  | j                        }| j                  d| j                  }	d|	z  }
d|	z  }t        j                  |t              }t        j                  |d      }t        j                  |d	      }t        j                  d
      }t        |d      5 }|j                  |      5 } ||      }t        |      }ddd       d   j!                  dd      }t#        |D cg c]  }t%        |       c}      }|| j&                  k7  r|r || j&                  |       |d   dk(  r|d   }n|d   }i }|j                  |      5 }t)        |      5 }|D ]  }|d   }|||<    	 ddd       ddd       t        j                  |
d      }t        j                  |d      }t        j                  |
dd      }t+        |      } d| _        t.        j0                   }!g }"t3        j4                         }#|#|_        d|_        	 |j;                         D ]  }$|$j                  }%t=        |%t>              r|%}&n|%jA                  d
      }&| jC                  |&      rF||&   }|d   r)tE        |$jF                        |d   k7  rtI        d|&z        |d   rj|d   j!                  dd      \  }'}(|j                  |%      5 }|jK                         })ddd       | jM                  )|'      \  }*}+|+|(k7  rtI        d|%z        |r+|&jO                  ||f      rtP        jS                  d|&       |&jO                  |      xr |&jU                  d       },|&jO                  |      rC|&j!                  d d      \  }*}-}.t        j                  j	                  ||-   tW        |.            }/n1|&||fv rt        j                  j	                  |tW        |&            }/|,s	|j                  |%      5 }| jY                  ||/       ddd       t        j                  d!k(  r&t        jZ                  |/|$j\                  d"z	  d#z         |"j_                  |/       |sS|d   rNt        |/d$      5 }|jK                         })| jM                  |)'      \  }*}0|0+k7  rtI        d%|/z        	 ddd       |!s|/jU                  d&      s	 | ja                  |/|'      }1|"j_                  |1       t        j                  jg                  tW        |%            }2t        j                  j	                  |#|2      }3|j                  |%      5 }| jY                  ||3       ddd       t        j                  j!                  |/      \  }4}2|4|_        |ji                  |2      }5| jk                  |5       |"jm                  |5        |rtP        jS                  d*       d}6nd}7| jn                  d   }|d+k(  rt        j                  |d,      }8	 |j                  |8      5 }tq        |      }9ddd       i }7d-D ]  }:d.|:z  };|;9v si x|7d/|:z  <   }<|9|;   js                         D ]Y  }=|=jt                  d0|=jv                  }>|=jx                  r!|>d1d2j	                  |=jx                        z  z  }>|>|<|=j                  <   [  nZ	 |j                  |      5 } ||      }t{        j|                  |      j                  d4      }7|7r|7j                  d5      }7ddd       |7r|7j                  d7i       }?|7j                  d8i       }@|?s@r|j                  dd      }At        j                  j                  |A      st        d9      A|_        |?j                         D ].  \  };}=|;d:|=}B|ji                  |B      }5| jk                  |5       0 @rFd;di}C@j                         D ]/  \  };}=|;d:|=}B|ji                  |BC      }5| jk                  |5       1 t        j                  j	                  ||      }t        |      }6t        |      }|d= |d= ||d<<   |6j                  ||      }|r|"j_                  |       |6j                  |"|d=   |       |6t        j                  |#       cddd       S # 1 sw Y   xY wc c}w # 1 sw Y   DxY w# 1 sw Y   IxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   GxY w# tb        $ r tP        je                  d(d)       Y w xY w# 1 sw Y   xY w# 1 sw Y   
xY w# tb        $ r tP        je                  d3       Y Gw xY w# 1 sw Y   UxY w# tb        $ r tP        je                  d6       Y yw xY w# tb        $ r' tP        j                  d>       | j                           w xY w# t        j                  |#       w xY w# 1 sw Y   yxY w)?a~  
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written. If kwarg ``bytecode_hashed_invalidation`` is True, written
        bytecode will try to use file-hash based invalidation (PEP-552) on
        supported interpreter versions (CPython 2.7+).

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        warnerlib_onlyFbytecode_hashed_invalidationr(   r  r   r   r   r   r   Nr   r*   r   zRoot-Is-Purelibr  r  r  streamr   r6   r  )dry_runTr&   size mismatch for %s=digest mismatch for %szlib_only: skipping %sr  rF   posix   i  r   zdigest mismatch on write for %sz.py)hashed_invalidationzByte-compilation failed)exc_infozlib_only: returning Nonez1.0zentry_points.txt)consoleguiz
%s_scriptszwrap_%s:z [%s],zAUnable to read legacy script metadata, so cannot generate scriptsrq   zpython.commandsz8Unable to read JSON metadata, so cannot generate scriptswrap_consolewrap_guizValid script path not specifiedz = rR  libprefixzinstallation failed.)JrI  r+  rO   rb   r>   r   r   ra   r   r   r   r   r   r	   r   r   r   r   r   r2  r   r   recordr;   dont_write_bytecodetempfilemkdtemp
source_dir
target_dirinfolist
isinstancer   r   rB  str	file_sizer   r   r   
startswithr  r  r/  r   copy_streamchmodexternal_attrr9   byte_compile	Exceptionwarningbasenamemakeset_executable_modeextendr   r   valuesrX  suffixflagsjsonloadr,  r   itemsr   r   write_shared_locationswrite_installed_filesshutilrmtree	exceptionrollback)Drl   r  makerkwargsrI  rD  rE  bc_hashed_invalidationrp   r   r9  r   metadata_namewheel_metadata_namerecord_namer   r   bwfr   r   r   r   r   r  r   r   readerr   r  data_pfxinfo_pfx
script_pfxfileopbcoutfilesworkdirzinforA  	u_arcnamekindvaluer   r)   r   	is_scriptwherer=  outfile	newdigestpycr   worknamer>  	filenamesdistcommandsepepdatar'  ru   r.   rv   rW   console_scriptsgui_scripts
script_dirscriptoptionssD                                                                       rC   installzWheel.install  s	   " --H%::j%0!',JE!R77<<dmm<"ii6x'!H,!x1IJ'nnXw?nnXx8""7+Xs# J	'r,- 0S\+B/0 )//Q7B "!5Q#a&!56L 2 22t))<8()V3y)y)G% )b) )V% )F%(
))) !~~h3H ~~h3H")R@J "'2F FM,,,BH &&(G  'E#Ea'[[] K3E#nnG!'95$+	$+NN7$;	y1 !),C1v#eoo"6#a&"@. 046?0@ A A1v&)!fll3&:eWWW- -#%779D-$(MM$$=	6!U?"2 48:A4B #C C  I$8$8(H9M$N%<iH !*!5!5j!A "D)2););F)C%C  !++H5'0sA'>5""$'',,uU|\"=M"N %)<k(JJ$"$'',,v|I7N"O$WWW- <"..r7;< 77g-HHWu/B/Bb/HE.QR 0&3q6!%gt!4 K')wwy/3}}T4/H9#,#6*: <@BI<J +K %K $7K '"2"25"9>&,&9&9'Nd ': 'f ( 4  WW--l7.CD#%77<<#<WWW- ="..r8<= "$w!7B+-($)JJrN	229= 	2WK3Z LL!;<D  $H#'99_#=L#u,&^^H6HI6!# ;)5c):;')H'9 6$03$6#$;DF$FHY_$=-3AY-=-=-? %678xx,J+,77,-388AGG;L1L,LA45!&&		%6	6F!#!7 O3%,S\+/99R=+<+<\+J#+/7||<M/NH	O  *2,,~r*J&.ll:r&B*k).9b)AJ#%77==#<&0 2= '> !>/9E,(7(=(=(? F167);,1JJv,>	 & : :9 EF
  ++0$.,7,=,=,? !JDAq:;Q-?F05

670KI$*$>$>y$I!J
 VX6A03D !KEi(i(#)E%L33E7CA * ..xx/68 g&UJ	' J	'0 0 "6) )) )R- -,< <K K $- > !'/H8< !/ !>>= =0; ;  ) 6"NN ,5 66O O
  ) F"NN ,E FFP    !78!
 g&UJ	' J	's  h9d(&h9d
 Ah91d >dd Bh9-B7g,$d-5Dg,d:#A%g,9e
g,g,"$eAg,!e;4B.g,#f4f fA;fg,g'A f:'g/E3g,"h9d	h9dd  d*	%h9-d72g,:e?g,eg, e84g,7e88g,;f g,f	ff73g,6f77g,:g	?gg)%g,(g))g,,0hhh66h99ic                     t         Qt        j                  j                  t	               t        d      dt        j                  d d z        }t        |      a t         S )Nzdylib-cachez%s.%sr&   )	cacherO   rb   r>   r   ra  r;   r<   r   )rl   bases     rC   _get_dylib_cachezWheel._get_dylib_cache  sI    =77<< 0#m2D '#*:*:2A*> >@D$KErE   c           	         t         j                  j                  | j                  | j                        }| j
                  d| j                  }d|z  }t        j                  |d      }t        j                  d      }g }t        |d      5 }	 |j                  |      5 } ||      }	t        j                  |	      }
| j                         }|j                  |      }t         j                  j                  |j                   |      }t         j                  j#                  |      st        j$                  |       |
j'                         D ]  \  }}t         j                  j                  |t)        |            }t         j                  j+                  |      sd}npt        j,                  |      j.                  }t0        j0                  j3                  |      }|j5                  |      }t1        j0                  |j6                   }||kD  }|r|j9                  ||       |j;                  ||f        	 d d d        d d d        |S # 1 sw Y   xY w# t<        $ r Y !w xY w# 1 sw Y   |S xY w)Nr(   r   
EXTENSIONSr   r   T)rO   rb   r>   r   r   ra   r   r   r   r   r	   r   rq  rr  r  prefix_to_dirr  r,  makedirsrs  r   r   statst_mtimedatetimefromtimestampgetinfo	date_timeextractr9   r   )rl   rp   r   r   rA  r   rz   r   r   r   rq   r  rX  
cache_basera   r.  destr  	file_timer   
wheel_times                        rC   _get_extensionszWheel._get_extensions  s   77<<dmm<"ii6!H,..<8""7+Xs# 	rWWW% 4 B!%2J 113E"00:F!#ejj&!AJ77==4J/)3)9)9); 4g!ww||JW8MN!ww~~d3&*G(*(>(>I(0(9(9(G(G	(RI#%::g#6D)1):):DNN)KJ&09&<G"JJw
;tTl344	2 /4 4*  /	2 sC   I&I!FI9II	I	I# I&"I##I&&I0c                     t        |       S )zM
        Determine if a wheel is compatible with the running system.
        )is_compatiblerk   s    rC   r  zWheel.is_compatible  s     T""rE   c                      y)zP
        Determine if a wheel is asserted as mountable by its metadata.
        TrI   rk   s    rC   is_mountablezWheel.is_mountable  s     rE   c                    t         j                  j                  t         j                  j                  | j                  | j
                              }| j                         sd|z  }t        |      | j                         sd|z  }t        |      |t        j                  v rt        j                  d|       y |r t        j                  j                  |       n t        j                  j                  d|       | j                         }|rPt        t        j                   vr#t        j                   j                  t               t        j#                  ||       y y )Nz)Wheel %s not compatible with this Python.z$Wheel %s is marked as not mountable.z%s already in pathr   )rO   rb   r   r>   r   r   r  r   r  r;   r  r  r9   insertr  _hook	meta_pathrr   )rl   r9   rp   msgrq   s        rC   mountzWheel.mount  s    77??277<<dmm#LM!!#=HC"3''  "88CC"3''sxxLL-x8)8,--/J-MM((/		(J/ rE   c                    t         j                  j                  t         j                  j                  | j                  | j
                              }|t        j                  vrt        j                  d|       y t        j                  j                  |       |t        j                  v rt        j                  |       t        j                  s;t        t        j                  v r$t        j                  j                  t               y y y )Nz%s not in path)rO   rb   r   r>   r   r   r;   r  r  rw   r  ri   r  )rl   rp   s     rC   unmountzWheel.unmount(  s    77??277<<dmm#LM388#LL)84HHOOH%5...X&&&CMM)MM((/ * 'rE   c           	         t         j                  j                  | j                  | j                        }| j
                  d| j                  }d|z  }d|z  }t        j                  |t              }t        j                  |d      }t        j                  |d      }t        j                  d      }t        |d      5 }	|	j                  |      5 }
 ||
      }t        |      }d d d        d   j                  d	d
      }t        |D cg c]  }t!        |       c}      }i }|	j                  |      5 }t#        |      5 }|D ]  }|d   }|||<    	 d d d        d d d        |	j%                         D ]
  }|j                  }t'        |t(              r|}n|j+                  d      }|j                  d      }d|v rt-        d|z        | j/                  |      ri||   }|d   r)t1        |j2                        |d   k7  rt-        d|z        |d
   s|d
   j                  dd
      \  }}|	j                  |      5 }|j5                         }d d d        | j7                  |      \  }}||k7  st-        d|z         	 d d d        y # 1 sw Y   xY wc c}w # 1 sw Y   LxY w# 1 sw Y   QxY w# 1 sw Y   ixY w# 1 sw Y   y xY w)Nr(   r  r   r   r   r   r   r   r*   r   rG  r   rF   ..invalid entry in wheel: %rr&   rJ  rK  rL  )rO   rb   r>   r   r   ra   r   r   r   r   r   r	   r   r   r   r   r   r   r_  r`  r   r   r   rB  ra  rb  r   r   )rl   rp   r   r9  r   r}  r~  r  r   r   r  r   r   r   r   r   r   r   r  r   r  r  rA  r  r  r  r   r)   r   s                                rC   r   zWheel.verify4  s   77<<dmm<"ii6x'!H,!x1IJ'nnXw?nnXx8""7+Xs# *	?r,- 0S\+B/0 )//Q7B "!5Q#a&!56L G% )b) )V% )F%(
)))  ?..gy1 'I 'w 7I OOC(19* ,79B,C D D ??9-i(q6c%//2c!f<* ,02;,< = =q6"%a&,,sA"6KD%) )R!wwy) $dD 9IAv. 046=0> ? ?5?*	? *	?0 0 "6
) )) )8) )K*	? *	?s   K	J'&K	J
K	9J0J#J0!B9K	)K	J="K	8K	J	K	#J-(J00J:	5K	=KK		Kc           	         d }d }t         j                  j                  | j                  | j                        }| j
                  d| j                  }d|z  }t        j                  |d      }	t               5 }
t        |d      5 }i }|j                         D ]  }|j                  }t        |t              r|}n|j                  d      }||	k(  r9d|v rt        d	|z        |j                  ||
       t         j                  j                  |
t!        |            }|||<    	 d
d
d
        ||      \  }} ||fi |}|r  |||      \  }}|r||k(  r	 |||       |1t#        j$                  dd|
      \  }}t        j&                  |       nWt         j                  j)                  |      st        d|z        t         j                  j                  || j                        }t+        |j-                               }t         j                  j                  |
|      }||f}| j/                  ||
|       | j1                  ||       |t3        j4                  ||       d
d
d
       |S # 1 sw Y   LxY w# 1 sw Y   S xY w)a  
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        c                 x    d x}}|dt         }|| vrd|z  }|| v r| |   }t        |      j                  }||fS )NrF   z%s/PKG-INFOrb   )r   r   r   )path_mapr   r   rb   r'  s        rC   get_versionz!Wheel.update.<locals>.get_version}  sS    !!Gd%'?@C("#h.h}"-55D= rE   c                 
   d }	 t        |       }| j                  d      }|dk  rd| z  }nZ| |dz   d  j                  d      D cg c]  }t        |       }}|dxx   dz  cc<   | d | ddj	                  d |D              }|rSt        |
      }||_	        |j                  t              }|j                  ||       t        j                  d| |       y y c c}w # t
        $ r t        j                  d	|        Y |w xY w)Nr(   r   z%s+1r   r*   r   +c              3   2   K   | ]  }t        |        y wrH   )ra  ).0r   s     rC   	<genexpr>z7Wheel.update.<locals>.update_version.<locals>.<genexpr>  s     1HQ#a&1Hs   z0Cannot update non-compliant (PEP-440) version %rr  )rb   legacyzVersion updated from %r to %r)r   r   r   r   r>   r   r  r  r   r   r/  r   r  )	r   rb   updatedrv   r   rW   r?   mdr  s	            rC   update_versionz$Wheel.update.<locals>.update_version  s
   G4%g.LL%q5$w.G-4QUV_-B-B3-GHSVHEH"INI)0!),1H%1H)HJG
 4($
'?@d62<g$&  I + 4 *+244s$   A C  C/C  C   DDr(   r   r   r   r   r  r  Nr   zwheel-update-)ro  rX  dirzNot a directory: %r)rO   rb   r>   r   r   ra   r   r   r   r	   r_  r`  r   r   r   r  r   r[  mkstempcloser,  r   rs  r	  r  rv  copyfile)rl   modifierdest_dirr{  r  r  rp   r   r   r  r  r   r  r  rA  r  rb   original_versionr)   modifiedcurrent_versionfdnewpathr  r  r   s                             rC   ro   zWheel.updatel  sY   "	!	&. 77<<dmm<"ii6!H,nnXx8Y ,	7'3' /2[[] /E#nnG!'95$+	$+NN7$;	 K/ y(. 0;=F0G H HJJug.77<<i1HID*.HY'//$ #.h"Aa3F3H(3Hh(G%";K(K"?D9#"*"2"2&:I7>#@KB HHRL77==2./Dx/OPP ggll8T]]CG $X^^%5 677<<:)""4-@w6#OOGX6Y,	7Z Y/ /,	7Z s&   ;J B I3)E J 3I=	8J  J
)NFFrH   )NN)F)r   r   r   __doc__r2  r   rm   propertyr   r   r   r   r   r   r   r   r   r   r	  r  r?  rB  r  r  r  r  r  r  r  r   ro   rI   rE   rC   r   r      s     MI'2R ; ;  $ $ + +  >  <	!%&  rh6 k'Z D#0*
06?pcrE   r   c                      dd l } | j                         }g }|d   dk(  rP|d   j                  d      D ].  }|j                  |j	                         rt        |      nd       0 t        |      }|S )Nr   glibcr   r*   )platformlibc_verr   r9   isdigitr   r   )r  verrz   rW   s       rC   _get_glibc_versionr    sh    



CF
1vQc" 	8AMMAIIK#a&Q7	8vMrE   c                  b   t         g} t         d   }t        t        j                  d   dz
  dd      D ]-  }| j	                  dj                  |t        |      g             / g }t               D ]8  }|j                  d      s|j	                  |j                  dd      d          : |j                          t        dk7  r|j                  dt               |j	                  d       g }t        g}t        j                  d	k(  rt        j                   d
t              }|r|j#                         \  }}}}	t%        |      }|	g}
|	dv r|
j	                  d       |	dv r|
j	                  d       |	dv r|
j	                  d       |	dv r|
j	                  d       |	dv r|
j	                  d       |dk\  r:|
D ]*  }|d|d|d|}|t        k7  s|j	                  |       , |dz  }|dk\  r:|D ]`  }|D ]W  }	|j	                  dj                  t&        | d   f      ||	f       |dk7  s6t        j                  j                  d      sV|	j)                  dd      }	t+               }t-        |      dk(  s|dk\  r/|j	                  dj                  t&        | d   f      |d|	z  f       |dk\  r/|j	                  dj                  t&        | d   f      |d|	z  f       |dk\  r/|j	                  dj                  t&        | d   f      |d|	z  f       |j	                  dj                  t&        | d   f      |d|d   d|d   d|	f       Z c t/        |       D ]`  \  }}|j	                  dj                  t&        |f      ddf       |dk(  s5|j	                  dj                  t&        |d   f      ddf       b t/        |       D ]X  \  }}|j	                  dj                  d |f      ddf       |dk(  s1|j	                  dj                  d |d   f      ddf       Z t1        |      S )!zG
    Return (pyver, abi, arch) tuples compatible with this Python.
    r   r   r   r6   z.abir*   r&   r   darwinz(\w+)_(\d+)_(\d+)_(\w+)$)i386ppcfat)r  r  x86_64fat3)ppc64r  fat64)r  r  intel)r  r  r  r  r  	universalr)   linuxlinux_)r&      zmanylinux1_%s)r&      zmanylinux2010_%s)r&      zmanylinux2014_%s
manylinux_r   r'   )r7   ranger;   r<   r9   r>   ra  rX   rc  r   sortr)  r  r*  r  rer   r   r   r:   rN   r  r   r0  set)versionsmajorminorabisro  rz   archesr2   ra   r   matchesr   rW   r   r?   r   r   s                    rC   compatible_tagsr    s    |HqMEs''*Q.R8 6E
 3456 D/ 1V$KKS!,Q/01 	IIK
f}AsKKFVF
||xHH0$7'(xxz$D%JEfG&u%00v&**w'))w'BB{+1*$ )E)-ueUCADya() 
 1*  C 	CDMM277J#<=sDIJf}!8!8!A||Hb1*,u:?rww
HQK/H'I3'6'='? @'rww
HQK/H'I3'9D'@'B C'rww
HQK/H'I3'9D'@'B CMM277J+D#Es;@8U1X;?$A#B C!	CC,  ) N
7rww
G45vuEF6MM277J
#;<feLMN  ) H
7rwwg/?@6MM277D'!*#56FGH
 v;rE   c                     t        | t              st        |       } d}|t        }|D ]7  \  }}}|| j                  v s|| j                  v s%|| j
                  v s4d} |S  |S )NFT)r`  r   COMPATIBLE_TAGSr   r   r   )wheelr   rz   r  r   r   s         rC   r  r  0  so    eU#eF| S$%++#"2tuzz7IFM	 MrE   rH   )Z
__future__r   r   r   r  emailr   r   rq  loggingrO   r   r  rv  r;   r[  r  r6   r   r   compatr   r	   r
   r   r   databaser   r   r   r   r   r   r[   r   r   r   r   r   r   r   r   r   r   r   r   r   	getLoggerr   r  r  hasattrr:   r  rc  r8   r7   r<   r   r(  rN   r*  r)  r   rD   compile
IGNORECASEVERBOSEr   r   r   r   r   r   rP   r  rR   importlib.machineryrT   importlib.utilrX   re   objectrg   r  r   r  r  r   r  rI   rE   rC   <module>r     sh   (    #    	  	  
   + C C +1 1! ! ! @			8	$
3#$J\\V$J\\UJJ%Y%%&89
#**2A..Jz	j	 ~c3'//S9iw'3>>*%
++j$
'
-
-c
21
5C" -Cbjj  ]]RZZ! "**  ]]RZZ	! RZZ)*
BJJ@A 66S=H/HA
C6	!f !F 		hF hTM` "#
rE   