o
    ~îjqi  ã                   @  s^  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mZm	Z	m
Z
 d dlmZ d dlmZ d dl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lmZmZ d dlm Z m!Z!m"Z" d dl#m$Z$m%Z% d dl&m'Z' ee(ƒZ)d0dd„Z*d1dd„Z+e+d2dd„ƒZ,d3d#d$„Z-d3d%d&„Z.d4d(d)„Z/G d*d+„ d+ƒZ0G d,d-„ d-ƒZ1G d.d/„ d/ƒZ2dS )5é    )ÚannotationsN)ÚCallableÚ	GeneratorÚIterable)Úcache_from_source)ÚAny)ÚBlockedImportErrorÚLegacyDistutilsInstallÚUninstallMissingRecord)Úget_bin_prefixÚget_bin_user)ÚBaseDistribution)ÚWINDOWS)Úegg_link_path_from_location)Ú	getLoggerÚ
indent_log)ÚaskÚnormalize_pathÚrmtree)ÚAdjacentTempDirectoryÚTempDirectory)Úrunning_under_virtualenvÚbin_dirÚstrÚscript_nameÚis_guiÚboolÚreturnúGenerator[str, None, None]c                 c  sZ   � t j | |¡}|V  tsdS |› d�V  |› d�V  |r%|› d�V  dS |› d�V  dS )z‘Create the fully qualified name of the files created by
    {console,gui}_scripts for the given ``dist``.
    Returns the list of file names
    Nz.exez.exe.manifestz-script.pywz
-script.py)ÚosÚpathÚjoinr   )r   r   r   Úexe_name© r#   úi/raid/bulk_storage/M2HATS/real-image-venv/lib/python3.10/site-packages/pip/_internal/req/req_uninstall.pyÚ_script_names   s   €r%   Úfnú)Callable[..., Generator[Any, None, None]]c                   s   t  ˆ ¡d‡ fdd„ƒ}|S )	NÚargsr   Úkwr   úGenerator[Any, None, None]c                  ?  s8   � t ƒ }ˆ | i |¤ŽD ]}||vr| |¡ |V  qd S ©N)ÚsetÚadd)r(   r)   ÚseenÚitem©r&   r#   r$   Úunique3   s   €
€ýz_unique.<locals>.unique)r(   r   r)   r   r   r*   )Ú	functoolsÚwraps)r&   r1   r#   r0   r$   Ú_unique0   s   r4   Údistr   c                 c  sª   � | j }|dusJ dƒ‚|  ¡ }|du rt| d�‚|D ]7}tj ||¡}|V  | d¡rRtj |¡\}}|dd… }tj ||d ¡}|V  tj ||d ¡}|V  qdS )aÇ  
    Yield all the uninstallation paths for dist based on RECORD-without-.py[co]

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc and .pyo in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .py[co].

    If RECORD is not found, raises an error,
    with possible information from the INSTALLER file.

    https://packaging.python.org/specifications/recording-installed-packages/
    Nznot installed©Údistributionú.pyéýÿÿÿú.pycú.pyo)ÚlocationÚiter_declared_entriesr
   r   r    r!   ÚendswithÚsplit)r5   r<   ÚentriesÚentryr    Údnr&   Úbaser#   r#   r$   Úuninstallation_paths>   s$   €

€÷rD   ÚpathsúIterable[str]úset[str]c                 C  s    t jj}tƒ }tƒ }t| td�D ]=}| |d ¡r|dd… n|}| |¡}|r@||v r-n t j |¡ |¡}||kr<dn|}|s(| 	|¡ | 	| |¡¡ q|S )zÈCompact a path set to contain the minimal number of paths
    necessary to contain all paths in the set. If /a/path/ and
    /a/path/to/a/file.txt are both in the set, leave only the
    shorter path.©ÚkeyÚ*NéÿÿÿÿÚ )
r   r    Úsepr,   ÚsortedÚlenr>   ÚrstripÚdirnamer-   )rE   rM   Úshort_pathsÚprefixesr    ÚcurrentÚparentÚnext_parentr#   r#   r$   Úcompact`   s    
ü
€rW   c           	        sò   dd„ | D ƒ}t |ƒ}tdd„ | ¡ D ƒtd�}t ƒ }dd	d
„‰|D ]L‰t‡fdd„|D ƒƒr0q"t ƒ }t ƒ }t ˆ¡D ]!\‰ }}| ‡ ‡‡fdd„|D ƒ¡ | ‡ ‡‡fdd„|D ƒ¡ q;|| sn| |¡ | 	ˆtj
 ¡ q"t t|j|ƒƒ|B S )z«Returns a set containing the paths that need to be renamed.

    This set may include directories when the original sequence of paths
    included every file on disk.
    c                 S  s   i | ]	}t j |¡|“qS r#   )r   r    Únormcase©Ú.0Úpr#   r#   r$   Ú
<dictcomp>~   ó    z'compress_for_rename.<locals>.<dictcomp>c                 S  s   h | ]
}t j |¡d  ’qS )r   )r   r    r?   rY   r#   r#   r$   Ú	<setcomp>€   s    z&compress_for_rename.<locals>.<setcomp>rH   Úar   r   c                  W  s   t j t jj| Ž ¡S r+   )r   r    rX   r!   )r_   r#   r#   r$   Ú	norm_joinƒ   s   z&compress_for_rename.<locals>.norm_joinc                 3  s"   � | ]}t j ˆ ¡ |¡V  qd S r+   )r   r    rX   Ú
startswith)rZ   Úw)Úrootr#   r$   Ú	<genexpr>‡   s   €  z&compress_for_rename.<locals>.<genexpr>c                 3  ó   � | ]	}ˆˆˆ |ƒV  qd S r+   r#   )rZ   Úd©rQ   r`   rc   r#   r$   rd   Ž   ó   € c                 3  re   r+   r#   )rZ   Úfrg   r#   r$   rd   �   rh   N)r_   r   r   r   )r,   rN   ÚvaluesrO   Úanyr   ÚwalkÚupdateÚdifference_updater-   rM   ÚmapÚ__getitem__)	rE   Úcase_mapÚ	remainingÚ	uncheckedÚ	wildcardsÚ	all_filesÚall_subdirsÚsubdirsÚfilesr#   rg   r$   Úcompress_for_renamex   s$   

€ry   útuple[set[str], set[str]]c                 C  sü   t | ƒ}t ƒ }t ƒ }t ƒ }|D ]}| d¡rq| d¡s d|v r)| tj |¡¡ | |¡ qt ttjj|ƒƒ}t|ƒ}|D ]2}t 	|¡D ]*\}}	}
|
D ]"}| d¡rTqLtj 
||¡}tj |¡rntj |¡|vrn| |¡ qLqEq>|dd„ |D ƒB }||fS )as  Returns a tuple of 2 sets of which paths to display to user

    The first set contains paths that would be deleted. Files of a package
    are not added and the top-level directory of the package has a '*' added
    at the end - to signify that all it's contents are removed.

    The second set contains files that would have been skipped in the above
    folders.
    r:   z__init__.pyz
.dist-infoc                 S  s   h | ]	}t j |d ¡’qS )rJ   )r   r    r!   )rZ   Úfolderr#   r#   r$   r^   Æ   r]   z.compress_for_output_listing.<locals>.<setcomp>)r,   r>   r-   r   r    rQ   ro   rX   rW   rl   r!   Úisfile)rE   Úwill_removeÚ	will_skipÚfoldersrx   r    Ú_normcased_filesr{   ÚdirpathÚ_ÚdirfilesÚfnameÚfile_r#   r#   r$   Úcompress_for_output_listingš   s6   


ÿ
€öÿr†   c                   @  s|   e Zd ZdZddd„Zd dd	„Zd d
d„Zd dd„Zddd„Zd!dd„Z	ddd„Z
ddd„Zed"dd„ƒZed#dd„ƒZdS )$ÚStashedUninstallPathSetzWA set of file rename operations to stash files while
    tentatively uninstalling them.r   ÚNonec                 C  s   i | _ g | _g | _d S r+   )Ú
_save_dirsÚ_movesÚ_manual_recovery©Úselfr#   r#   r$   Ú__init__Ï   s   
z StashedUninstallPathSet.__init__r    r   c                 C  sB   zt |ƒ}W n ty   tdd�}Y nw || jtj |¡< |jS )z�Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir.Ú	uninstall©Úkind)r   ÚOSErrorr   r‰   r   r    rX   )r�   r    Úsave_dirr#   r#   r$   Ú_get_directory_stashÙ   s   ÿz,StashedUninstallPathSet._get_directory_stashc                 C  sº   t j |¡}t j |¡d}}d}||kr3z| j| }W n& ty%   Y nw t j |¡|}}||kst j |¡}tdd�}|| j|< t j ||¡}|rZ|t jjkrZt j 	|j|¡S |jS )z‚Stashes a file.

        If no root has been provided, one will be created for the directory
        in the user's temp directory.Nr�   r�   )
r   r    rX   rQ   r‰   ÚKeyErrorr   ÚrelpathÚcurdirr!   )r�   r    ÚheadÚold_headr“   r–   r#   r#   r$   Ú_get_file_stashç   s&   
ÿú	

z'StashedUninstallPathSet._get_file_stashc                 C  s   t j |¡ot j |¡ }|r|  |¡}n|  |¡}|r't j |¡r't  |¡ t j |¡}t j |¡s8t  	|¡ zt
 ||¡ W n tyV   t j |¡rU| j ||f¡ ‚ w | j ||f¡ t j |¡\}}|r~|r~zt  |¡ W |S  ty}   Y |S w |S )z?Move a path into temporary storage and return its new location.)r   r    ÚisdirÚislinkr”   rš   ÚrmdirrQ   ÚexistsÚmakedirsÚshutilÚmoveÚBaseExceptionÚlexistsr‹   ÚappendrŠ   r?   Ú
removedirsr’   )r�   r    Úpath_is_dirÚnew_pathrU   Ú
old_parentÚnamer#   r#   r$   Ústash  s6   


üýýzStashedUninstallPathSet.stashc                 C  s2   | j rdS | j ¡ D ]}| ¡  q
g | _i | _dS )zDRemove backups unless an interrupted transfer needs manual recovery.N)r‹   r‰   rj   ÚcleanuprŠ   )r�   r“   r#   r#   r$   Úcommit$  s   

zStashedUninstallPathSet.commitÚoriginalÚstashedc                 C  s¤   zAt  |¡ t j |¡st j |¡rt  |¡ n
t j |¡r"t|ƒ t j |¡\}}|r9|r9t j 	|¡s9t  
|¡ t ||¡ W dS  tyQ   | j ||f¡ ‚ w )zBRestore a completed stash and record failures for manual recovery.N)r   Úlstatr    r|   rœ   Úunlinkr›   r   r?   rž   rŸ   r    r¡   r¢   r‹   r¤   )r�   r­   r®   rU   r©   r#   r#   r$   Ú_restore.  s   

þz StashedUninstallPathSet._restorec                   sÐ   | j D ]}tjdg|¢R Ž  qtƒ ‰ zC| j D ]2\}}zt d||¡ ˆ  ||f¡ |  ||¡ W q tyH } zt d|¡ W Y d}~qd}~ww W ‡ fdd„| j D ƒ| _ n‡ fdd„| j D ƒ| _ w |  ¡  dS )z>Restore stashed files, keeping backups when restoration fails.zMoving to %s
 from %szReplacing %s from %szException: %sNc                   s   g | ]}|ˆ vr|‘qS r#   r#   )rZ   r¡   ©Ú	attemptedr#   r$   Ú
<listcomp>R  s    z4StashedUninstallPathSet.rollback.<locals>.<listcomp>)	rŠ   ÚloggerÚinfor,   Údebugr-   r±   r’   r¬   )r�   r[   r­   r®   Úexr#   r²   r$   ÚrollbackB  s    
€ÿû0	z StashedUninstallPathSet.rollbackc                 C  s"   | j D ]\}}t d||¡ qdS )z;Report retained backups that still need manual restoration.z?Could not restore %r from %r. Check both paths before retrying.N)Úrecovery_pathsrµ   Úerror)r�   r­   Úbackupr#   r#   r$   Úreport_failed_recoveryV  s   ýÿz.StashedUninstallPathSet.report_failed_recoveryútuple[tuple[str, str], ...]c                 C  s   t | j| j ƒS )z9Return original paths and their pending backup locations.)ÚtuplerŠ   r‹   rŒ   r#   r#   r$   rº   _  s   z&StashedUninstallPathSet.recovery_pathsr   c                 C  s
   t | jƒS r+   )r   rŠ   rŒ   r#   r#   r$   Úcan_rollbackd  s   
z$StashedUninstallPathSet.can_rollbackN©r   rˆ   )r    r   r   r   )r­   r   r®   r   r   rˆ   )r   r¾   ©r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rŽ   r”   rš   rª   r¬   r±   r¹   r½   Úpropertyrº   rÀ   r#   r#   r#   r$   r‡   Ë   s    





"



	r‡   c                   @  s~   e Zd ZdZd#dd„Zd$dd„Zd%dd„Zd&dd„Zd'd(dd„Zd)dd„Z	e
d*dd„ƒZd+dd„Zd+dd„Zed,d d!„ƒZd"S )-ÚUninstallPathSetzMA set of file paths to be removed in the uninstallation of a
    requirement.r5   r   r   rˆ   c                 C  s4   t ƒ | _t ƒ | _i | _|| _tƒ | _t t	¡| _
d S r+   )r,   Ú_pathsÚ_refuseÚ_pthÚ_distr‡   Ú_moved_pathsr2   Ú	lru_cacher   Ú_normalize_path_cached)r�   r5   r#   r#   r$   rŽ   m  s   zUninstallPathSet.__init__r    r   r   c                 C  s   t ƒ sdS | |  tj¡¡S )zs
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        T)r   ra   rÏ   ÚsysÚprefix)r�   r    r#   r#   r$   Ú
_permittedx  s   zUninstallPathSet._permittedc                 C  sŠ   t j |¡\}}t j |  |¡t j |¡¡}t j |¡sd S |  |¡r*| j 	|¡ n| j
 	|¡ t j |¡d dkrC|  	t|ƒ¡ d S d S )Né   r8   )r   r    r?   r!   rÏ   rX   rž   rÒ   rÉ   r-   rÊ   Úsplitextr   )r�   r    r˜   Útailr#   r#   r$   r-   ƒ  s   
ÿzUninstallPathSet.addÚpth_filerA   c                 C  sP   |   |¡}|  |¡r || jvrt|ƒ| j|< | j|  |¡ d S | j |¡ d S r+   )rÏ   rÒ   rË   ÚUninstallPthEntriesr-   rÊ   )r�   rÖ   rA   r#   r#   r$   Úadd_pth–  s   


zUninstallPathSet.add_pthFÚauto_confirmÚverbosec              
   C  s  | j st d| jj¡ dS | jj› d| jj› �}t d|¡ tƒ �c |s)|  |¡rt| j}t	| j ƒ}z(t
t|ƒƒD ]}| |¡ t d|¡ q8| j ¡ D ]}| ¡  qKt d|¡ W n" ttfys   |jrj|  ¡  ‚ | ¡  | ¡  ‚ w W d  ƒ dS W d  ƒ dS 1 s‡w   Y  dS )z\Remove paths in ``self._paths`` with confirmation (unless
        ``auto_confirm`` is True).z7Can't uninstall '%s'. No files were found to uninstall.Nú-zUninstalling %s:zRemoving file or directory %szSuccessfully uninstalled %s)rÉ   rµ   r¶   rÌ   Úraw_nameÚraw_versionr   Ú_allowed_to_proceedrÍ   ry   rN   rW   rª   rÚ   rË   rj   Úremover’   r   rÀ   r¹   r¬   r½   )r�   rÙ   rÚ   Údist_name_versionÚmovedÚ
for_renamer    Úpthr#   r#   r$   rß   Ÿ  s>   þ


þúòÿ"òzUninstallPathSet.removec                 C  sp   ddd„}|st | jƒ\}}nt| jƒ}tƒ }|d	|ƒ |d
|ƒ |d| jƒ |r1|dt| jƒƒ tddƒdkS )z@Display which files would be deleted and prompt for confirmationÚmsgr   rE   rF   r   rˆ   c                 S  sZ   |sd S t  | ¡ tƒ � tt|ƒƒD ]}t  |¡ qW d   ƒ d S 1 s&w   Y  d S r+   )rµ   r¶   r   rN   rW   )rä   rE   r    r#   r#   r$   Ú_displayÇ  s   
ÿ"ÿz6UninstallPathSet._allowed_to_proceed.<locals>._displayzWould remove:z+Would not remove (might be manually added):z%Would not remove (outside of prefix):zWill actually move:zProceed (Y/n)? )ÚyÚnrL   rç   N)rä   r   rE   rF   r   rˆ   )r†   rÉ   r,   rÊ   ry   r   )r�   rÚ   rå   r}   r~   r#   r#   r$   rÞ   Ä  s   
	


z$UninstallPathSet._allowed_to_proceedc                 C  s   | j jS r+   )rÍ   rÀ   rŒ   r#   r#   r$   rÀ   à  s   zUninstallPathSet.can_rollbackc                 C  st   | j s| jjst d| jj¡ dS t d| jj¡ z| j ¡  W | j 	¡  n| j 	¡  w | j
 ¡ D ]}| ¡  q1dS )z1Rollback the changes previously made by remove().z'Can't roll back %s; was not uninstalledNzRolling back uninstall of %s)rÀ   rÍ   rº   rµ   r»   rÌ   rÜ   r¶   r¹   r½   rË   rj   )r�   rã   r#   r#   r$   r¹   ä  s   þ
ÿzUninstallPathSet.rollbackc                 C  s   | j  ¡  dS )z?Remove temporary save dir: rollback will no longer be possible.N)rÍ   r¬   rŒ   r#   r#   r$   r¬   õ  s   zUninstallPathSet.commitc              
     sš  |j }|j}|d u rt d|j¡ | |ƒS t|ƒ}|js*t d|j|tj¡ | |ƒS |dd„ t	 
d¡t	 
d¡hD ƒv rGt d|j|¡ | |ƒS | |ƒ}t|jƒ}|jof|d uoftj |¡of| |j› d�¡ }|rÞ|d urr| |¡ | ¡ }|d urŠ|D ]}	| tj ||	¡¡ q|nò| d	¡rÝz| d
¡}
W n ty¡   g ‰ Y nw |
jdd�‰ ‡ fdd„| d	¡ ¡ D ƒD ]&}tj ||¡}| |¡ | |› d�¡ | |› d�¡ | |› d�¡ q¶nž|jræt|d�‚|j�r| |¡ tj |¡d }tj tj |¡d¡}| |d| ¡ nq|j �rt!|ƒD ]}| |¡ �qn_|�rut"|ƒ�}tj #| $¡  %¡ ¡}| &|¡}W d   ƒ n	1 �s?w   Y  tj '||¡�s^J d|› d|› d|j› d|› d�	ƒ‚| |¡ tj tj |¡d¡}| ||¡ nt (d||¡ |j)�r„t*ƒ }nt+ƒ }z$| ,¡ D ]}| tj ||¡¡ t-�r¨| tj ||› d�¡¡ �qŒW n tt.f�y·   Y nw d%d#d$„}|||ƒD ]}| |¡ �qÂ|S )&Nz-Not uninstalling %s since it is not installedz1Not uninstalling %s at %s, outside environment %sc                 S  s   h | ]}|r|’qS r#   r#   rY   r#   r#   r$   r^     s    ýÿz-UninstallPathSet.from_dist.<locals>.<setcomp>ÚstdlibÚ
platstdlibz<Not uninstalling %s at %s, as it is in the standard library.z	.egg-infoztop_level.txtznamespace_packages.txtF)Úkeependsc                   s   g | ]
}|r|ˆ vr|‘qS r#   r#   rY   ©Ú
namespacesr#   r$   r´   <  s    ýþz.UninstallPathSet.from_dist.<locals>.<listcomp>r8   r:   r;   r6   rÓ   zeasy-install.pthz./z	Egg-link z (to z') does not match installed location of z (at ú)z)Not sure how to uninstall: %s - Check: %sz.batr5   r   r   r   r   r   c                 s  sR   � |   ¡ D ]!}|jdkrt||jdƒE d H  q|jdkr&t||jdƒE d H  qd S )NÚconsole_scriptsFÚgui_scriptsT)Úiter_entry_pointsÚgroupr%   r©   )r5   r   Úentry_pointr#   r#   r$   Úiter_scripts_to_remove‡  s   €

€üz:UninstallPathSet.from_dist.<locals>.iter_scripts_to_remove)r5   r   r   r   r   r   )/r<   Úinfo_locationrµ   r¶   Úcanonical_namer   ÚlocalrÐ   rÑ   Ú	sysconfigÚget_pathr   rÜ   Ú"installed_with_setuptools_egg_infor   r    rž   r>   Úsetuptools_filenamer-   r=   r!   Úis_fileÚ	read_textÚFileNotFoundErrorÚ
splitlinesÚinstalled_by_distutilsr	   Úinstalled_as_eggr?   rQ   rØ   Úinstalled_with_dist_inforD   ÚopenrX   ÚreadlineÚstriprÏ   Úsamefiler·   Úin_usersiter   r   Úiter_distutils_script_namesr   ÚNotADirectoryError)Úclsr5   Údist_locationrô   Únormalized_dist_locationÚpaths_to_removeÚdevelop_egg_linkÚsetuptools_flat_installationÚinstalled_filesÚinstalled_fileÚnamespace_packagesÚtop_level_pkgr    Úeasy_install_eggÚeasy_install_pthÚfhÚlink_pointerÚnormalized_link_pointerr   Úscriptró   Úsr#   rë   r$   Ú	from_distù  sè   þüþý
ÿ
þú
ÿ
ÿ

þ
€


þÿ
ÿþÿÿÿý
ÿý€ýÿ

zUninstallPathSet.from_distN)r5   r   r   rˆ   )r    r   r   r   )r    r   r   rˆ   )rÖ   r   rA   r   r   rˆ   )FF)rÙ   r   rÚ   r   r   rˆ   )rÚ   r   r   r   rÂ   rÁ   )r5   r   r   rÈ   )rÃ   rÄ   rÅ   rÆ   rŽ   rÒ   r-   rØ   rß   rÞ   rÇ   rÀ   r¹   r¬   Úclassmethodr  r#   r#   r#   r$   rÈ   i  s    



	
%

rÈ   c                   @  s4   e Zd Zddd„Zddd	„Zdd
d„Zddd„ZdS )r×   rÖ   r   r   rˆ   c                 C  s   || _ tƒ | _d | _d S r+   )Úfiler,   r@   Ú_saved_lines)r�   rÖ   r#   r#   r$   rŽ   ˜  s   
zUninstallPthEntries.__init__rA   c                 C  s<   t j |¡}trt j |¡d s| dd¡}| j |¡ d S )Nr   ú\ú/)r   r    rX   r   Ú
splitdriveÚreplacer@   r-   )r�   rA   r#   r#   r$   r-   �  s   
zUninstallPthEntries.addc              	   C  s4  t  d| j¡ tj | j¡st  d| j¡ d S t| jdƒ�}| ¡ }| 	¡ | _
W d   ƒ n1 s1w   Y  tdd„ |D ƒƒrBd}nd}|r[|d  | d	¡¡s[|d | d	¡ |d< | jD ]}zt  d
|¡ | ||  d	¡¡ W q^ ty{   Y q^w t| jdƒ�}| |¡ W d   ƒ d S 1 s“w   Y  d S )NzRemoving pth entries from %s:z.Cannot remove entries from nonexistent file %sÚrbc                 s  s   � | ]}d |v V  qdS )s   
Nr#   )rZ   Úliner#   r#   r$   rd   ¸  s   € z-UninstallPthEntries.remove.<locals>.<genexpr>z
Ú
rK   zutf-8zRemoving entry: %sÚwb)rµ   rÚ   r  r   r    r|   Úwarningr  Ú	readlinesÚcopyr  rk   r>   Úencoder@   rß   Ú
ValueErrorÚ
writelines)r�   r  ÚlinesÚendlinerA   r#   r#   r$   rß   ¬  s.   þ
ÿ"ÿzUninstallPthEntries.remover   c              	   C  s�   | j d u rt d| j¡ dS t d| j¡ z!t| jdƒ�}| | j ¡ W d   ƒ W dS 1 s/w   Y  W dS  ttfyG   t d| j¡ ‚ w )Nz.Cannot roll back changes to %s, none were madeFz!Rolling %s back to previous stater%  z6Could not restore %r. Check this file before retrying.T)	r  rµ   r»   r  r·   r  r+  r’   r   )r�   r  r#   r#   r$   r¹   Ê  s"   
ÿøúÿüzUninstallPthEntries.rollbackN)rÖ   r   r   rˆ   )rA   r   r   rˆ   rÁ   rÂ   )rÃ   rÄ   rÅ   rŽ   r-   rß   r¹   r#   r#   r#   r$   r×   —  s
    


r×   )r   r   r   r   r   r   r   r   )r&   r'   r   r'   )r5   r   r   r   )rE   rF   r   rG   )rE   rF   r   rz   )3Ú
__future__r   r2   r   r    rÐ   r÷   Úcollections.abcr   r   r   Úimportlib.utilr   Útypingr   Úpip._internal.exceptionsr   r	   r
   Úpip._internal.locationsr   r   Úpip._internal.metadatar   Úpip._internal.utils.compatr   Úpip._internal.utils.egg_linkr   Úpip._internal.utils.loggingr   r   Úpip._internal.utils.miscr   r   r   Úpip._internal.utils.temp_dirr   r   Úpip._internal.utils.virtualenvr   rÃ   rµ   r%   r4   rD   rW   ry   r†   r‡   rÈ   r×   r#   r#   r#   r$   Ú<module>   s@    


!

"1   0