o
    ­—Žj–q  ã                   @  sÜ  d 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ZddlZddl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 ddlmZ dd	l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& dd
l'm(Z(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5m6Z6m7Z7 ddl8m9Z9m:Z: ddl;m<Z<m=Z= ddl>m?Z?m@Z@ ddlAmBZBmCZCmDZDmEZE ddlFmGZGmHZHmIZImJZJ ddlKmLZL G dd„ de%ƒZMe NeO¡ZPe$deQƒZReSeReQeTeQB f ZUdudvd!d"„ZVdwd%d&„ZWdxd(d)„ZXdyd,d-„ZYdzd1d2„ZZd{d6d7„Z[d|d;d<„Z\d}d?d@„Z]d~dAdB„Z^ddLdM„Z_d€dPdQ„Z`G dRdS„ dSƒZaG dTdU„ dUƒZbG dVdW„ dWe1ƒZcd�d[d\„ZdG d]d^„ d^e+ƒZe	_	_		`	d‚dƒdmdn„Zfejgd„dqdr„ƒZh	_	_		`	d‚d…dsdt„ZidS )†zFSupport for installing and building the "wheel" binary package format.é    )ÚannotationsN)Úurlsafe_b64encode)ÚCallableÚ	GeneratorÚIterableÚIteratorÚSequence)ÚMessage)ÚchainÚfilterfalseÚstarmap)ÚPath)ÚIOÚAnyÚBinaryIOÚNewTypeÚProtocolÚcast)ÚZipFileÚZipInfo)ÚScriptMaker)Úget_export_entry)Úcanonicalize_name)ÚInstallationError)Úget_major_minor_version)ÚBaseDistributionÚFilesystemWheelÚget_wheel_distribution)ÚDIRECT_URL_METADATA_NAMEÚ	DirectUrl)ÚSCHEME_KEYSÚScheme)Úadjacent_tmp_fileÚreplace)ÚStreamWrapperÚ
ensure_dirÚ	hash_fileÚ	partition)Úcurrent_umaskÚis_within_directoryÚ2set_extracted_file_to_default_mode_plus_executableÚzip_item_is_executable)Úparse_wheelc                   @  s0   e Zd ZU ded< ded< ded< dd	d
„ZdS )ÚFileÚ
RecordPathÚsrc_record_pathÚstrÚ	dest_pathÚboolÚchangedÚreturnÚNonec                 C  s   d S ©N© ©Úselfr7   r7   úc/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pip/_internal/operations/install/wheel.pyÚsave=   s   z	File.saveN©r4   r5   )Ú__name__Ú
__module__Ú__qualname__Ú__annotations__r;   r7   r7   r7   r:   r-   8   s
   
 r-   r.   é   Úpathr0   Ú	blocksizeÚintr4   útuple[str, str]c                 C  s6   t | |ƒ\}}dt| ¡ ƒ d¡ d¡ }|t|ƒfS )z?Return (encoded_digest, length) for path using hashlib.sha256()zsha256=Úlatin1ú=)r&   r   ÚdigestÚdecodeÚrstripr0   )rB   rC   ÚhÚlengthrH   r7   r7   r:   ÚrehashG   s   rM   Úmodeúdict[str, Any]c                 C  s   | dddœS )zPReturn keyword arguments to properly open a CSV file
    in the given mode.
    Ú úutf-8)rN   ÚnewlineÚencodingr7   )rN   r7   r7   r:   Úcsv_io_kwargsN   s   rT   r2   c                 C  sÎ   t j | ¡sJ ‚t| dƒ�0}| ¡ }| d¡s 	 W d  ƒ dS tj t 	¡ ¡}d| t j
 d¡ }| ¡ }W d  ƒ n1 s@w   Y  t| dƒ�}| |¡ | |¡ W d  ƒ dS 1 s`w   Y  dS )	zQReplace #!python with #!/path/to/python
    Return True if file was changed.
    Úrbs   #!pythonNFs   #!ÚasciiÚwbT)ÚosrB   ÚisfileÚopenÚreadlineÚ
startswithÚsysÚ
executableÚencodeÚgetfilesystemencodingÚlinesepÚreadÚwrite)rB   ÚscriptÚ	firstlineÚexenameÚrestr7   r7   r:   Ú
fix_scriptU   s"   
ý
ú

þýrh   Úmetadatar	   c                 C  s   |   dd¡ ¡ dkS )NzRoot-Is-PurelibrP   Útrue)ÚgetÚlower)ri   r7   r7   r:   Úwheel_root_is_purelibi   s   rm   Údistr   ú%tuple[dict[str, str], dict[str, str]]c                 C  sL   i }i }|   ¡ D ]}|jdkr|j||j< q|jdkr!|j||j< q||fS )NÚconsole_scriptsÚgui_scripts)Úiter_entry_pointsÚgroupÚvalueÚname)rn   rp   rq   Úentry_pointr7   r7   r:   Úget_entrypointsm   s   

€rw   ÚscriptsúSequence[str]ú
str | Nonec                   s€  | sdS t  t¡}| D ]}t|ƒ}|j ¡ }|j}||  |¡ qdd„ tj	 
dd¡ tj¡D ƒ‰ ˆ  ttjƒj ¡ ¡ ‡ fdd„| ¡ D ƒ}|sKdS g }| ¡ D ]5\}}t|ƒ}	t|	ƒdkrhd	|	d
 › d�}
nd d |	dd… ¡d |	d  ¡}
| d|
› d|› d�¡ qQd}t|ƒdkr˜| | d¡¡ n| | d¡¡ tdd„ tj	 
dd¡ tj¡D ƒƒ}|r»d}| |¡ d |¡S )z�Determine if any scripts are not on PATH and format a warning.
    Returns a warning message if one or more scripts are not on PATH,
    otherwise None.
    Nc                 S  s   g | ]}t |ƒ ¡ ‘qS r7   )r   Úresolve©Ú.0Úir7   r7   r:   Ú
<listcomp>‰   s    ÿz5message_about_scripts_not_on_PATH.<locals>.<listcomp>ÚPATHrP   c                   s   i | ]\}}|ˆ vr||“qS r7   r7   )r}   Ú
parent_dirrx   ©Únot_warn_dirsr7   r:   Ú
<dictcomp>�   s
    þz5message_about_scripts_not_on_PATH.<locals>.<dictcomp>é   zscript r   z iszscripts {} areú, éÿÿÿÿz and zThe z installed in 'z' which is not on PATH.zeConsider adding {} to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.zthis directoryzthese directoriesc                 s  s    � | ]}|r|d  dkV  qdS )r   ú~Nr7   r|   r7   r7   r:   Ú	<genexpr>°   s   € ÿ

ÿz4message_about_scripts_not_on_PATH.<locals>.<genexpr>ziNOTE: The current PATH contains path(s) starting with `~`, which may not be expanded by all applications.Ú
)ÚcollectionsÚdefaultdictÚsetr   Úparentr{   ru   ÚaddrX   Úenvironrk   ÚsplitÚpathsepÚappendr]   r^   ÚitemsÚsortedÚlenÚformatÚjoinÚany)rx   Úgrouped_by_dirÚdestfiler1   r�   Úscript_nameÚwarn_forÚ	msg_linesÚdir_scriptsÚsorted_scriptsÚ
start_textÚlast_line_fmtÚwarn_for_tildeÚtilde_warning_msgr7   r‚   r:   Ú!message_about_scripts_not_on_PATHx   sR   

ÿ
þÿÿÿÿÿ

r¥   ÚoutrowsúIterable[InstalledCSVRow]úlist[tuple[str, str, str]]c                 C  s   t dd„ | D ƒƒS )aŸ  Normalize the given rows of a RECORD file.

    Items in each row are converted into str. Rows are then sorted to make
    the value more predictable for tests.

    Each row is a 3-tuple (path, hash, size) and corresponds to a record of
    a RECORD file (see PEP 376 and PEP 427 for details).  For the rows
    passed to this function, the size can be an integer as an int or string,
    or the empty string.
    c                 s  s$   � | ]\}}}||t |ƒfV  qd S r6   )r0   )r}   Úrecord_pathÚhash_Úsizer7   r7   r:   r‰   Ó   s   € 
ÿz&_normalized_outrows.<locals>.<genexpr>)r•   )r¦   r7   r7   r:   Ú_normalized_outrows¾   s   ÿr¬   r©   Úlib_dirc                 C  s   t j || ¡S r6   )rX   rB   r˜   )r©   r­   r7   r7   r:   Ú_record_to_fs_pathØ   ó   r®   c                 C  sP   t j | ¡d  ¡ t j |¡d  ¡ krt j | |¡} |  t jjd¡} td| ƒS )Nr   ú/r.   )rX   rB   Ú
splitdriverl   Úrelpathr#   Úsepr   )rB   r­   r7   r7   r:   Ú_fs_to_record_pathÜ   s   (
r´   Úold_csv_rowsúlist[list[str]]Ú	installedúdict[RecordPath, RecordPath]r3   úset[RecordPath]Ú	generatedú	list[str]úlist[InstalledCSVRow]c                 C  sâ   g }| D ]I}t |ƒdkrt d|¡ td|d ƒ}| ||¡}||v r-tt||ƒƒ\}	}
nt |ƒdkr7|d nd}	t |ƒdkrC|d nd}
| ||	|
f¡ q|D ]}t||ƒ}t|ƒ\}	}
| ||	|
f¡ qP|dd	„ | 	¡ D ƒ S )
z_
    :param installed: A map from archive RECORD path to installation RECORD
        path.
    é   z,RECORD line has more than three elements: %sr.   r   r…   rP   é   c                 S  s   g | ]}|d d f‘qS )rP   r7   )r}   Úinstalled_record_pathr7   r7   r:   r     s    
ÿz.get_csv_rows_for_installed.<locals>.<listcomp>)
r–   ÚloggerÚwarningr   ÚpoprM   r®   r“   r´   Úvalues)rµ   r·   r3   rº   r­   Úinstalled_rowsÚrowÚold_record_pathÚnew_record_pathrH   rL   ÚfrB   r7   r7   r:   Úget_csv_rows_for_installedæ   s$   
ÿrÉ   Úconsoleúdict[str, str]c                 C  s  |   ¡ } g }|  dd¡}|rLdtjvr| d| ¡ tj dd¡dkr1| dtjd › d|› �¡ | dtƒ › d|› �¡ d	d
„ | D ƒ}|D ]}| |= qF|  dd¡}|r{dtjvr`| d| ¡ | dtƒ › d|› �¡ dd
„ | D ƒ}|D ]}| |= qu| 	t
dj|  ¡ ƒ¡ |S )zk
    Given the mapping from entrypoint name to callable, return the relevant
    console script specs.
    ÚpipNÚENSUREPIP_OPTIONSzpip = rP   Ú
altinstallr   z = c                 S  ó   g | ]
}t  d |¡r|‘qS )zpip(\d+(\.\d+)?)?$©ÚreÚmatch©r}   Úkr7   r7   r:   r   9  s    z,get_console_script_specs.<locals>.<listcomp>Úeasy_installzeasy_install = zeasy_install-c                 S  rÏ   )zeasy_install(-\d+\.\d+)?$rÐ   rÓ   r7   r7   r:   r   E  s
    ÿÿú{} = {})ÚcopyrÂ   rX   r�   r“   rk   r]   Úversion_infor   Úextendr   r—   r”   )rÊ   Úscripts_to_generateÚ
pip_scriptÚpip_eprÔ   Úeasy_install_scriptÚeasy_install_epr7   r7   r:   Úget_console_script_specs  s4   !

ÿÿrß   c                   @  s*   e Zd Zdd	d
„Zddd„Zddd„ZdS )ÚZipBackedFiler/   r.   r1   r0   Úzip_filer   r4   r5   c                 C  s   || _ || _|| _d| _d S ©NF)r/   r1   Ú	_zip_filer3   )r9   r/   r1   rá   r7   r7   r:   Ú__init__R  s   
zZipBackedFile.__init__r   c                 C  s   | j  | j¡S r6   )rã   Úgetinfor/   r8   r7   r7   r:   Ú_getinfoZ  r¯   zZipBackedFile._getinfoc              	   C  s¸   t j | j¡rt  | j¡ |  ¡ }t| jdƒ�0}|jdkr@| j |¡�}t	|jdƒ}t
 |||¡ W d   ƒ n1 s;w   Y  W d   ƒ n1 sJw   Y  t|ƒrZt| jƒ d S d S )NrW   r   rA   )rX   rB   Úexistsr1   Úunlinkræ   rZ   Ú	file_sizerã   ÚminÚshutilÚcopyfileobjr+   r*   )r9   ÚzipinfoÚdestrÈ   rC   r7   r7   r:   r;   ]  s   	
þ€þÿzZipBackedFile.saveN)r/   r.   r1   r0   rá   r   r4   r5   )r4   r   r<   )r=   r>   r?   rä   ræ   r;   r7   r7   r7   r:   rà   Q  s    

rà   c                   @  s    e Zd Zd
dd„Zddd„Zd	S )Ú
ScriptFileÚfiler-   r4   r5   c                 C  s$   || _ | j j| _| j j| _d| _d S râ   )Ú_filer/   r1   r3   )r9   rð   r7   r7   r:   rä   x  s   


zScriptFile.__init__c                 C  s   | j  ¡  t| jƒ| _d S r6   )rñ   r;   rh   r1   r3   r8   r7   r7   r:   r;   ~  s   
zScriptFile.saveN)rð   r-   r4   r5   r<   )r=   r>   r?   rä   r;   r7   r7   r7   r:   rï   w  s    
rï   c                      s   e Zd Zd‡ fdd„Z‡  ZS )ÚMissingCallableSuffixrv   r0   r4   r5   c                   s   t ƒ  d|› d�¡ d S )NzInvalid script entry point: z… - A callable suffix is required. See https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.)Úsuperrä   )r9   rv   ©Ú	__class__r7   r:   rä   „  s   
ÿzMissingCallableSuffix.__init__)rv   r0   r4   r5   )r=   r>   r?   rä   Ú__classcell__r7   r7   rô   r:   rò   ƒ  s    rò   ÚspecificationÚscripts_dirr5   c                 C  s|   t | ƒ}|d u r
d S |jd u rtt|ƒƒ‚tj ||j¡}tj |¡tj |¡k}|s0t	||ƒs<t
d|j›d|› d�ƒ‚d S )Nz Invalid script entry point name z?: the script would be installed outside the scripts directory (z).)r   Úsuffixrò   r0   rX   rB   r˜   ru   Úabspathr)   r   )r÷   rø   Úentryrî   Úresolves_to_scripts_dirr7   r7   r:   Ú_raise_for_invalid_entrypoint�  s   

ÿÿÿrý   c                      s,   e Zd Ze d¡Z	dd‡ fd	d
„Z‡  ZS )ÚPipScriptMakerzÁ        import sys
        from %(module)s import %(import_name)s
        if __name__ == '__main__':
            sys.argv[0] = sys.argv[0].removesuffix('.exe')
            sys.exit(%(func)s())
Nr÷   r0   Úoptionsúdict[str, Any] | Noner4   r»   c                   s   t || jƒ tƒ  ||¡S r6   )rý   Ú
target_dirró   Úmake)r9   r÷   rÿ   rô   r7   r:   r  ¬  s   zPipScriptMaker.maker6   )r÷   r0   rÿ   r   r4   r»   )r=   r>   r?   ÚtextwrapÚdedentÚscript_templater  rö   r7   r7   rô   r:   rþ   ¡  s    
	ÿrþ   TFru   Ú	wheel_zipr   Ú
wheel_pathÚschemer!   Ú	pycompileÚwarn_script_locationÚ
direct_urlúDirectUrl | NoneÚ	requestedÚscript_executablec	           ;   	     sè  t || ƒ\}	}
t|
ƒr|j‰n|j‰i ‰tƒ ‰g }	dAdB‡‡‡fd
d„}dCdd„}dD‡fdd„‰ dE‡ fdd„}dF‡ ‡fdd„}dCdd„}ttt | ¡ ƒ}t	||ƒ}t
||ƒ\}}||ˆƒ}t||ƒ}dCdd „}t
||ƒ\}}|||ƒ}t||ƒ}t||ƒ}ttˆƒt| ƒƒ}t|ƒ\‰‰dG‡‡fd#d$„}t||ƒ}t	||ƒ}tt|ƒ}t||ƒ}tƒ }|D ]#} tj | j¡}!|!|vrÄt|!ƒ | |!¡ |  ¡  || j| j| jƒ q®dH‡‡fd&d'„}"dId(d)„}#|�rKt t tj ¡¡�P}$t! "¡ �; t! #d*¡ |"ƒ D ]*}%t$j%|%d+d+d,�}&|&�r#|#|%ƒ}'tj &|'¡�sJ ‚td|' 'tjj(d-¡ƒ}(||(|'ƒ qùW d.  ƒ n	1 �s/w   Y  W d.  ƒ n	1 �s?w   Y  t) *|$ +¡ ¡ t,d.|j-ƒ})|d.u�rY||)_.d+|)_/d/h|)_0d+|)_1t2ˆƒ}*tt3d0j4ˆ 5¡ ƒƒ}+|) 6|*¡},| 7|,¡ | 7|) 6|+d1d+i¡¡ |�r—t8|,ƒ}-|-d.u�r—t) 9|-¡ d2t:ƒ  @ ‰tj;dJ‡fd6d7„ƒ}.tj <ˆ|	¡}/tj <|/d8¡}0|.|0ƒ�}1|1 =d9¡ W d.  ƒ n	1 �sÊw   Y  | >|0¡ |d.u�rtj <|/t?¡}2|.|2ƒ�}3|3 =| @¡  Ad:¡¡ W d.  ƒ n	1 �súw   Y  | >|2¡ |�r)tj <|/d;¡}4tB|4d<ƒ� W d.  ƒ n	1 �sw   Y  | >|4¡ | Cd=¡}5ttD E|5 F¡ ¡ƒ}6tG|6ˆˆ|ˆd>�}7tj <|/d=¡}8|.|8fi tHd?ƒ¤Ž�}9tD Itd@|9ƒ¡}:|: JtK|7ƒ¡ W d.  ƒ d.S 1 �smw   Y  d.S )KaØ  Install a wheel.

    :param name: Name of the project to install
    :param wheel_zip: open ZipFile for wheel being installed
    :param scheme: Distutils scheme dictating the install directories
    :param req_description: String used in place of the requirement, for
        logging
    :param pycompile: Whether to byte-compile installed Python files
    :param warn_script_location: Whether to check that scripts are installed
        into a directory on PATH
    :param script_executable: Python executable to use for console scripts
    :raises UnsupportedWheel:
        * when the directory holds an unpacked wheel with incompatible
          Wheel-Version
        * when the .dist-info dir does not match the wheel
    FÚsrcfiler.   r›   r0   Úmodifiedr2   r4   r5   c                   s(   t |ˆƒ}|ˆ| < |rˆ  |¡ dS dS )z6Map archive RECORD paths to installation RECORD paths.N)r´   r�   )r  r›   r  Únewpath)r3   r·   r­   r7   r:   Úrecord_installedÝ  s
   
ÿz(_install_wheel.<locals>.record_installedrB   c                 S  s
   |   d¡S )Nr°   )Úendswith©rB   r7   r7   r:   Úis_dir_pathæ  s   
z#_install_wheel.<locals>.is_dir_pathÚdest_dir_pathÚtarget_pathc                   s$   t | |ƒsd}t| ˆ || ¡ƒ‚d S )NzRThe wheel {!r} has a file {!r} trying to install outside the target directory {!r})r)   r   r—   )r  r  Úmessage)r  r7   r:   Úassert_no_path_traversalé  s   
ÿÿûz0_install_wheel.<locals>.assert_no_path_traversalrá   r   rî   úCallable[[RecordPath], File]c                   s   d‡‡ ‡fdd„}|S )Nr©   r.   r4   r-   c                   s0   t j | ¡}t j ˆ|¡}ˆ ˆ|ƒ t| |ˆƒS r6   )rX   rB   Únormpathr˜   rà   )r©   Únormed_pathr1   )r  rî   rá   r7   r:   Úmake_root_scheme_fileö  s   
zM_install_wheel.<locals>.root_scheme_file_maker.<locals>.make_root_scheme_file©r©   r.   r4   r-   r7   )rá   rî   r  )r  )rî   rá   r:   Úroot_scheme_file_makeró  s   z._install_wheel.<locals>.root_scheme_file_makerr  r!   c                   s*   ‡ fdd„t D ƒ‰d	‡‡‡‡fdd„}|S )
Nc                   s   i | ]}|t ˆ |ƒ“qS r7   )Úgetattr)r}   Úkey)r  r7   r:   r„     s    zB_install_wheel.<locals>.data_scheme_file_maker.<locals>.<dictcomp>r©   r.   r4   r-   c           	        sÄ   t j | ¡}z| t jjd¡\}}}W n ty'   dˆ› d| ›d�}t|ƒ‚w zˆ| }W n! tyO   d t	ˆƒ¡}dˆ› d|› d| ›d|› d	�	}t|ƒ‚w t j ||¡}ˆ ||ƒ t
| |ˆƒS )
Nr¾   zUnexpected file in z: zG. .data directory contents should be named like: '<scheme key>/<path>'.r†   zUnknown scheme key used in z (for file zW). .data directory contents should be in subdirectories named with a valid scheme key (ú))rX   rB   r  r‘   r³   Ú
ValueErrorr   ÚKeyErrorr˜   r•   rà   )	r©   r  Ú_Ú
scheme_keyÚdest_subpathr  Úscheme_pathÚvalid_scheme_keysr1   )r  Úscheme_pathsr  rá   r7   r:   Úmake_data_scheme_file  s.   ÿûÿýÿø

zM_install_wheel.<locals>.data_scheme_file_maker.<locals>.make_data_scheme_filer  )r    )rá   r  r+  )r  r  )r  r*  rá   r:   Údata_scheme_file_makerþ  s   z._install_wheel.<locals>.data_scheme_file_makerc                 S  s   |   dd¡d  d¡S )Nr°   r…   r   ú.data)r‘   r  r  r7   r7   r:   Úis_data_scheme_path   s   z+_install_wheel.<locals>.is_data_scheme_pathc                 S  s2   |   dd¡}t|ƒdko|d  d¡o|d dkS )Nr°   r¾   r   r-  r…   rx   )r‘   r–   r  )rB   Úpartsr7   r7   r:   Úis_script_scheme_path*  s   &z-_install_wheel.<locals>.is_script_scheme_pathrð   r-   c                   sz   | j }tj |¡}| ¡  d¡r|d d… }n| ¡  d¡r%|d d… }n| ¡  d¡r3|d d… }n|}|ˆ v p<|ˆv S )Nz.exeéüÿÿÿz
-script.pyiöÿÿÿz.pya)r1   rX   rB   Úbasenamerl   r  )rð   rB   ru   Ú	matchname)rÊ   Úguir7   r:   Úis_entrypoint_wrapper=  s   z-_install_wheel.<locals>.is_entrypoint_wrapperúGenerator[str, None, None]c                  3  sJ   � t tˆ  ¡ ƒƒD ]} tj ˆ| ¡}tj |¡sq	| d¡sq	|V  q	d S )Nz.py)r•   r�   rÃ   rX   rB   r˜   rY   r  )Úinstalled_pathÚfull_installed_path)r·   r­   r7   r:   Úpyc_source_file_paths`  s   €
úz-_install_wheel.<locals>.pyc_source_file_pathsc                 S  s   t j | ¡S )z8Return the path the pyc file would have been written to.)Ú	importlibÚutilÚcache_from_sourcer  r7   r7   r:   Úpyc_output_pathm  s   z'_install_wheel.<locals>.pyc_output_pathÚignoreT)ÚforceÚquietr°   NrP   rÖ   r4  i¶  Úkwargsr   úGenerator[BinaryIO, None, None]c                 ;  sV   � t | fi |¤Ž�}|V  W d   ƒ n1 sw   Y  t |jˆ ¡ t|j| ƒ d S r6   )r"   rX   Úchmodru   r#   )rB   rA  rÈ   )Úgenerated_file_moder7   r:   Ú_generate_fileª  s   €ÿz&_install_wheel.<locals>._generate_fileÚ	INSTALLERs   pip
rQ   Ú	REQUESTEDrW   ÚRECORD)r·   r3   rº   r­   ÚwzIO[str])F)r  r.   r›   r0   r  r2   r4   r5   )rB   r.   r4   r2   )r  r0   r  r0   r4   r5   )rá   r   rî   r0   r4   r  )rá   r   r  r!   r4   r  )rð   r-   r4   r2   )r4   r6  )rB   r0   r4   r0   )rB   r0   rA  r   r4   rB  )Lr,   rm   ÚpurelibÚplatlibr�   r   Úlistr.   Únamelistr   r'   Úmapr
   r   r   r   rw   rï   rX   rB   Údirnamer1   r%   r�   r;   r/   r3   Ú
contextlibÚredirect_stdoutr$   Úfrom_streamr]   ÚstdoutÚwarningsÚcatch_warningsÚfilterwarningsÚ
compileallÚcompile_filerç   r#   r³   rÀ   ÚdebugÚgetvaluerþ   rx   r^   ÚclobberÚvariantsÚset_moderß   r   r—   r”   Úmake_multiplerÙ   r¥   rÁ   r(   Úcontextmanagerr˜   rc   r“   r   Úto_jsonr_   rZ   Ú	read_textÚcsvÚreaderÚ
splitlinesrÉ   rT   ÚwriterÚ	writerowsr¬   );ru   r  r  r  r	  r
  r  r  r  Úinfo_dirri   rº   r  r  r  r,  r.  ÚpathsÚ
file_pathsÚroot_scheme_pathsÚdata_scheme_pathsr  Úfilesr0  Úother_scheme_pathsÚscript_scheme_pathsr+  Úother_scheme_filesÚdistributionr5  Úscript_scheme_filesÚexisting_parentsrð   r�   r9  r=  rS  rB   ÚsuccessÚpyc_pathÚpyc_record_pathÚmakerrÚ   Úgui_scripts_to_generateÚgenerated_console_scriptsÚmsgrE  Údest_info_dirÚinstaller_pathÚinstaller_fileÚdirect_url_pathÚdirect_url_fileÚrequested_pathÚrecord_textÚrecord_rowsÚrowsr©   Úrecord_filere  r7   )r  r3   rÊ   rD  r4  r·   r­   r  r:   Ú_install_wheel³  sð   ÿ
	

"



ÿ


þÿ





ÿ


ÿ
€øþ€ý





ÿ


ÿ
ÿ

û	$ür„  Úreq_descriptionúGenerator[None, None, None]c              
   c  sH   � zd V  W d S  t y# } zd| › d|jd › �}t |ƒ|‚d }~ww )Nz	For req: z. r   )r   Úargs)r…  Úer  r7   r7   r:   Úreq_error_contextÜ  s   €
€þr‰  c	           
      C  s„   t |dd��2}	t|ƒ� t| |	|||||||d�	 W d   ƒ n1 s#w   Y  W d   ƒ d S W d   ƒ d S 1 s;w   Y  d S )NT)Ú
allowZip64)	ru   r  r  r  r	  r
  r  r  r  )r   r‰  r„  )
ru   r  r  r…  r	  r
  r  r  r  Úzr7   r7   r:   Úinstall_wheelå  s"   
÷ÿÿ"ÿrŒ  )rA   )rB   r0   rC   rD   r4   rE   )rN   r0   r4   rO   )rB   r0   r4   r2   )ri   r	   r4   r2   )rn   r   r4   ro   )rx   ry   r4   rz   )r¦   r§   r4   r¨   )r©   r.   r­   r0   r4   r0   )rB   r0   r­   r0   r4   r.   )rµ   r¶   r·   r¸   r3   r¹   rº   r»   r­   r0   r4   r¼   )rÊ   rË   r4   r»   )r÷   r0   rø   r0   r4   r5   )TTNFN)ru   r0   r  r   r  r0   r  r!   r	  r2   r
  r2   r  r  r  r2   r  rz   r4   r5   )r…  r0   r4   r†  )ru   r0   r  r0   r  r!   r…  r0   r	  r2   r
  r2   r  r  r  r2   r  rz   r4   r5   )jÚ__doc__Ú
__future__r   r‹   rW  rP  rb  r:  ÚloggingÚos.pathrX   rÑ   rë   r]   r  rT  Úbase64r   Úcollections.abcr   r   r   r   r   Úemail.messager	   Ú	itertoolsr
   r   r   Úpathlibr   Útypingr   r   r   r   r   r   Úzipfiler   r   Úpip._vendor.distlib.scriptsr   Úpip._vendor.distlib.utilr   Úpip._vendor.packaging.utilsr   Úpip._internal.exceptionsr   Úpip._internal.locationsr   Úpip._internal.metadatar   r   r   Úpip._internal.models.direct_urlr   r   Úpip._internal.models.schemer    r!   Úpip._internal.utils.filesystemr"   r#   Úpip._internal.utils.miscr$   r%   r&   r'   Úpip._internal.utils.unpackingr(   r)   r*   r+   Úpip._internal.utils.wheelr,   r-   Ú	getLoggerr=   rÀ   r0   r.   ÚtuplerD   ÚInstalledCSVRowrM   rT   rh   rm   rw   r¥   r¬   r®   r´   rÉ   rß   rà   rï   rò   rý   rþ   r„  r_  r‰  rŒ  r7   r7   r7   r:   Ú<module>   sŠ     
	






F




 K&

÷  +÷