Ë
    ‹¤ëjqi  ã                  óŠ  — 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)	 	 	 	 	 	 	 	 dd„Z*	 	 	 	 dd„Z+e+dd„«       Z,dd„Z-dd„Z.dd„Z/ G d„ d«      Z0 G d„ d«      Z1 G d„ d«      Z2y) é    )Ú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_virtualenvc              #  ó    K  — t         j                  j                  | |«      }|–— t        sy|› d�–— |› d�–— |r|› d�–— y|› d�–— y­w)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   )Úbin_dirÚscript_nameÚis_guiÚexe_names       úl/home/oem/CyberBrain26-unified/dev-env/.venv/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.pyÚ_script_namesr"      s^   è ø€ ô �w‰w�|‰|˜G [Ó1€HØ
‚NÝØØˆJ�dÐ
ÒØˆJ�mÐ
$Ò$ÙØ�
˜+Ð&Ó&à�
˜*Ð%Ó%ùs   ‚AAc                óD   ‡ — t        j                  ‰ «      dˆ fd„«       }|S )Nc               ?  óp   •K  — t        «       } ‰| i |¤ŽD ]  }||vsŒ|j                  |«       |–— Œ y ­w©N)ÚsetÚadd)ÚargsÚkwÚseenÚitemÚfns       €r!   Úuniquez_unique.<locals>.unique3   s=   øè ø€ ä›ˆÙ˜�O ‘Oò 	ˆDØ˜4ÒØ—‘˜”Ø“
ñ	ùs   ƒ6ž6)r(   r   r)   r   ÚreturnzGenerator[Any, None, None])Ú	functoolsÚwraps)r,   r-   s   ` r!   Ú_uniquer1   0   s'   ø€ ô ‡_�_�RÓôó ðð €Mó    c              #  óÖ  K  — | j                   }|€J d«       ‚| j                  «       }|€t        | ¬«      ‚|D ]­  }t        j                  j                  ||«      }|–— |j                  d«      sŒ9t        j                  j                  |«      \  }}|dd }t        j                  j                  ||dz   «      }|–— t        j                  j                  ||dz   «      }|–— Œ¯ y­w)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)Údistr:   ÚentriesÚentryr   Údnr,   Úbases           r!   Úuninstallation_pathsrC   >   sÏ   è ø€ ð �}‰}€HØÐÐ0 Ó0Ðà×(Ñ(Ó*€GØ€Ü$°$Ô7Ð7àò 	ˆÜ�w‰w�|‰|˜H eÓ,ˆØŠ
Ø�=‰=˜ÕÜ—W‘W—]‘] 4Ó(‰FˆB�Ø�c�r�7ˆDÜ—7‘7—<‘<  D¨6¡MÓ2ˆDØŠJÜ—7‘7—<‘<  D¨6¡MÓ2ˆDØ‹Jñ	ùs   ‚A.C)Á1A8C)c                óÊ  — t         j                  j                  }t        «       }t        «       }t	        | t
        ¬«      D ]   }|j                  |dz   «      r|dd n|}|j                  |«      }|r?||v rŒ6t         j                  j                  |«      j                  |«      }||k(  rdn|}|rŒ?|j                  |«       |j                  |j                  |«      «       Œ¢ |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'   )ÚpathsrJ   Úshort_pathsÚprefixesr   ÚcurrentÚparentÚnext_parents           r!   ÚcompactrU   `   sÈ   € ô �'‰'�+‰+€CÜ›E€KÜ›€Hä�u¤#Ô&ò 
.ˆØ#Ÿ}™}¨S°3©YÔ7�$�s˜‘)¸TˆØ—‘ Ó$ˆÙØ˜Ñ!ØÜŸ'™'Ÿ/™/¨&Ó1×8Ñ8¸Ó=ˆKØ&¨&Ò0‘R°kˆFò	 ð �O‰O˜DÔ!Ø�L‰L˜Ÿ™¨Ó,Õ-ð
.ð Ðr2   c                ó  ‡
‡‡— | D �ci c]"  }t         j                  j                  |«      |“Œ$ }}t        |«      }t	        |j                  «       D �ch c]$  }t         j                  j                  |«      d   ’Œ& c}t        ¬«      }t        «       }dd„Š|D ]º  Št        ˆfd„|D «       «      rŒt        «       }t        «       }t        j                  ‰«      D ]>  \  Š
}}	|j                  ˆ
ˆˆfd„|D «       «       |j                  ˆ
ˆˆfd„|	D «       «       Œ@ ||z
  rŒˆ|j                  |«       |j                  ‰t         j                  z   «       Œ¼ t        t        |j                  |«      «      |z  S c c}w c c}w )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.
    r   rE   c                 ót   — t         j                  j                  t        j                  j                  | Ž «      S r%   )r   r   Únormcaser   )Úas    r!   Ú	norm_joinz&compress_for_rename.<locals>.norm_joinƒ   s$   € Ü�w‰w×Ñ¤§¡§¡¨aÐ 0Ó1Ð1r2   c              3  óz   •K  — | ]2  }t         j                  j                  ‰«      j                  |«      –— Œ4 y ­wr%   )r   r   rX   Ú
startswith)Ú.0ÚwÚroots     €r!   ú	<genexpr>z&compress_for_rename.<locals>.<genexpr>‡   s+   øè ø€ ÒG¸Œr�w‰w×Ñ Ó%×0Ñ0°×3ÑGùs   ƒ8;c              3  ó2   •K  — | ]  } ‰‰‰|«      –— Œ y ­wr%   © )r]   ÚdrN   rZ   r_   s     €€€r!   r`   z&compress_for_rename.<locals>.<genexpr>Ž   s   øè ø€ ÒL¸q™y¨¨w¸×:ÑLùó   ƒc              3  ó2   •K  — | ]  } ‰‰‰|«      –— Œ y ­wr%   rb   )r]   ÚfrN   rZ   r_   s     €€€r!   r`   z&compress_for_rename.<locals>.<genexpr>�   s   øè ø€ ÒH¸Q™Y t¨W°a×8ÑHùrd   )rY   Ústrr.   rg   )r   r   rX   r&   rK   Úvaluesr=   rL   ÚanyÚwalkÚupdateÚdifference_updater'   rJ   ÚmapÚ__getitem__)rO   ÚpÚcase_mapÚ	remainingÚ	uncheckedÚ	wildcardsÚ	all_filesÚall_subdirsÚsubdirsÚfilesrN   rZ   r_   s             @@@r!   Úcompress_for_renamerx   x   s<  ú€ ð 16Ö6¨1”—‘× Ñ  Ó# QÑ&Ð6€HÐ6Ü�H“€IÜ°X·_±_Ó5FÖG°œŸ™Ÿ™ aÓ(¨Ó+ÒGÌSÔQ€IÜ›%€Ió2ð ò )ˆÜÓG¸YÔGÔGàä!›eˆ	Ü #£ˆÜ')§w¡w¨t£}ò 	IÑ#ˆG�W˜eØ×ÑÕLÀGÔLÔLØ×ÑÕHÀ%ÔHÕHð	Ið ˜IÓ%Ø×'Ñ'¨	Ô2Ø�M‰M˜$¤§¡™-Õ(ð)ô" Œs�8×'Ñ'¨Ó3Ó4°yÑ@Ð@ùò3 7ùâGs   ˆ'E8Á)E=c                ót  — t        | «      }t        «       }t        «       }t        «       }|D ]h  }|j                  d«      rŒ|j                  d«      sd|v r.|j                  t        j                  j                  |«      «       |j                  |«       Œj t        t        t        j                  j                  |«      «      }t        |«      }|D ]¬  }t        j                  |«      D ]’  \  }}	}
|
D ]‡  }|j                  d«      rŒt        j                  j                  ||«      }t        j                  j                  |«      sŒUt        j                  j                  |«      |vsŒw|j                  |«       Œ‰ Œ” Œ® ||D �ch c]"  }t        j                  j                  |d«      ’Œ$ c}z  }||fS c c}w )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.
    r8   z__init__.pyz
.dist-inforG   )r&   r<   r'   r   r   rN   rm   rX   rU   rj   r   Úisfile)rO   Úwill_removeÚ	will_skipÚfoldersrw   r   Ú_normcased_filesÚfolderÚdirpathÚ_ÚdirfilesÚfnameÚfile_s                r!   Úcompress_for_output_listingr…   š   so  € ô �e“*€KÜ“€Iô ‹e€GÜ‹E€EØò ˆØ�=‰=˜Ô ØØ�=‰=˜Ô'¨<¸4Ñ+?Ø�K‰KœŸ™Ÿ™¨Ó-Ô.Ø�	‰	�$�ðô œ3œrŸw™w×/Ñ/°Ó7Ó8Ðä�gÓ€Gð ò )ˆÜ$&§G¡G¨F£Oò 	)Ñ ˆG�Q˜Ø!ò 
)�Ø—>‘> &Ô)ØäŸ™Ÿ™ W¨eÓ4�ä—G‘G—N‘N 5Õ)ÜŸ™×(Ñ(¨Ó/Ð7GÒGð —M‘M %Õ(ñ
)ñ	)ð)ð À7ÖK¸œ2Ÿ7™7Ÿ<™<¨°Õ4ÒKÑK€Kà˜	Ð!Ð!ùò Ls   Æ'F5c                  ót   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zedd
„«       Zedd„«       Zy)ÚStashedUninstallPathSetzWA set of file rename operations to stash files while
    tentatively uninstalling them.c                ó.   — i | _         g | _        g | _        y r%   )Ú
_save_dirsÚ_movesÚ_manual_recovery©Úselfs    r!   Ú__init__z StashedUninstallPathSet.__init__Ï   s   € ð 57ˆŒð .0ˆŒà79ˆÕr2   c                óÀ   — 	 t        |«      }|| j                  t        j
                  j                  |«      <   |j
                  S # t        $ r t        d¬«      }Y ŒOw xY w)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_dirs      r!   Ú_get_directory_stashz,StashedUninstallPathSet._get_directory_stashÙ   sU   € ð	7Ü&;¸DÓ&AˆHð 3;ˆ�‰œŸ™×(Ñ(¨Ó.Ñ/à�}‰}Ðøô	 ò 	7Ü$¨+Ô6ŠHð	7ús   ‚A ÁAÁAc                ó~  — t         j                  j                  |«      }t         j                  j                  |«      d}}d}||k7  r	 | j                  |   }n:t         j                  j                  |«      }t        d¬«      }|| j                  |<   t         j                  j                  ||«      }|rG|t         j                  j                  k7  r*t         j                  j                  |j                  |«      S |j                  S # t
        $ r Y nw xY wt         j                  j                  |«      |}}||k7  rŒöŒæ)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   rN   r‰   ÚKeyErrorr   ÚrelpathÚcurdirr   )r�   r   ÚheadÚold_headr”   r˜   s         r!   Ú_get_file_stashz'StashedUninstallPathSet._get_file_stashç   sû   € ô
 �w‰w×Ñ Ó%ˆÜŸ™Ÿ™¨Ó.°ˆhˆØˆà�hÒðØŸ?™?¨4Ñ0�Øô —7‘7—?‘? 4Ó(ˆDÜ$¨+Ô6ˆHØ$,ˆD�O‰O˜DÑ!ä—'‘'—/‘/ $¨Ó-ˆÙ�w¤"§'¡'§.¡.Ò0Ü—7‘7—<‘< §¡¨wÓ7Ð7Ø�}‰}Ðøô ò ÙðúäŸW™WŸ_™_¨TÓ2°D�(ˆDð �hÓøs   Á	D Ä	DÄDc                ó|  — t         j                  j                  |«      xr  t         j                  j                  |«       }|r| j	                  |«      }n| j                  |«      }|r4t         j                  j                  |«      rt        j                  |«       t         j                  j                  |«      }t         j                  j                  |«      st        j                  |«       	 t        j                  ||«       | j                   j                  ||f«       t         j                  j#                  |«      \  }}|r|r	 t        j$                  |«       |S |S # t        $ r> t         j                  j                  |«      r| j                  j                  ||f«       ‚ w xY w# t&        $ r Y |S w xY w)z?Move a path into temporary storage and return its new location.)r   r   ÚisdirÚislinkr•   rœ   ÚrmdirrN   ÚexistsÚmakedirsÚshutilÚmoveÚBaseExceptionÚlexistsr‹   ÚappendrŠ   r=   Ú
removedirsr“   )r�   r   Úpath_is_dirÚnew_pathrS   Ú
old_parentÚnames          r!   ÚstashzStashedUninstallPathSet.stash  sQ  € ä—g‘g—m‘m DÓ)ÒF´"·'±'·.±.ÀÓ2FÐ.FˆÙØ×0Ñ0°Ó6‰Hà×+Ñ+¨DÓ1ˆHáœ2Ÿ7™7Ÿ=™=¨Ô2ä�H‰H�XÔä—‘—‘ Ó*ˆÜ�w‰w�~‰~˜fÔ%Ü�K‰K˜Ôð	Ü�K‰K˜˜hÔ'ð 	�‰×Ñ˜D (Ð+Ô,äŸ7™7Ÿ=™=¨Ó.Ñˆ
�DÙ™$ðÜ—‘˜jÔ)ð ˆˆxˆøô ò 	Ü�w‰w�‰˜xÔ(à×%Ñ%×,Ñ,¨d°HÐ-=Ô>Øð		ûô ò Øàˆðús   Ã1E$ ÅF. Å$AF+Æ.	F;Æ:F;c                ó˜   — | j                   ry| j                  j                  «       D ]  }|j                  «        Œ g | _        i | _        y)zDRemove backups unless an interrupted transfer needs manual recovery.N)r‹   r‰   rh   ÚcleanuprŠ   )r�   r”   s     r!   ÚcommitzStashedUninstallPathSet.commit$  sD   € à× Ò ØàŸ™×.Ñ.Ó0ò 	ˆHØ×ÑÕð	àˆŒØˆ�r2   c                ób  — 	 t        j                  |«       t         j                  j                  |«      st         j                  j	                  |«      rt        j
                  |«       n*t         j                  j                  |«      rt        |«       t         j                  j                  |«      \  }}|r6|r4t         j                  j                  |«      st        j                  |«       t        j                  ||«       y# t        $ r | j                  j                  ||f«       ‚ w xY w)zBRestore a completed stash and record failures for manual recovery.N)r   Úlstatr   rz   rŸ   Úunlinkrž   r   r=   r¡   r¢   r£   r¤   r¥   r‹   r§   )r�   ÚoriginalÚstashedrS   r¬   s        r!   Ú_restorez StashedUninstallPathSet._restore.  sÅ   € ð	ä�H‰H�WÔä�w‰w�~‰~˜hÔ'¬2¯7©7¯>©>¸(Ô+CÜ—	‘	˜(Õ#Ü—‘—‘˜xÔ(Ü�xÔ äŸ7™7Ÿ=™=¨Ó2‰LˆF�DÙ™$¤r§w¡w§~¡~°fÔ'=Ü—‘˜FÔ#ä�K‰K˜ Õ*øÜò 	Ø×!Ñ!×(Ñ(¨(°GÐ)<Ô=Øð	ús   ‚DD Ä(D.c                ó4  — | j                   D ]  }t        j                  dg|¢­Ž  Œ t        «       }	 | j                   D ]B  \  }}	 t        j	                  d||«       |j                  ||f«       | j                  ||«       ŒD 	 | j                   D �cg c]	  }||vsŒ|‘Œ c}| _         | j                  «        y# t        $ r }t        j	                  d|«       Y d}~ŒŸd}~ww xY wc c}w # | j                   D �cg c]	  }||vsŒ|‘Œ nc c}w c}| _         w xY w)z>Restore stashed files, keeping backups when restoration fails.zMoving to %s
 from %szReplacing %s from %szException: %sN)	rŠ   ÚloggerÚinfor&   Údebugr'   r¶   r“   r°   )r�   ro   Ú	attemptedr´   rµ   Úexr¤   s          r!   Úrollbackz StashedUninstallPathSet.rollbackB  sô   € à—‘ò 	6ˆAÜ�K‰KÐ0Ð5°1Ô5ð	6ô +.«%ˆ	ð
	RØ%)§[¡[ò 6Ñ!�˜'ð6Ü—L‘LÐ!7¸À7ÔKØ—M‘M 8¨WÐ"5Ô6Ø—M‘M (¨GÕ4ñ	6ð -1¯K©KÖQ D¸4ÀyÒ;Pš4ÒQˆDŒKà�‰�øô ò 6Ü—L‘L °"×5Ñ5ûð6üò Rø¨D¯K©KÖQ D¸4ÀyÒ;Pš4ÑQùÔQˆD�KúsS   ³C+ Á<B:ÂC+ Â	C&ÂC&Â:	C#ÃCÃC+ ÃC#Ã#C+ Ã+DÃ:	D	ÄD	ÄDc                óZ   — | j                   D ]  \  }}t        j                  d||«       Œ y)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´   Úbackups      r!   Úreport_failed_recoveryz.StashedUninstallPathSet.report_failed_recoveryV  s1   € à $× 3Ñ 3ò 	ÑˆH�fÜ�L‰LØQØØõñ	r2   c                óF   — t        | j                  | j                  z   «      S )z9Return original paths and their pending backup locations.)ÚtuplerŠ   r‹   rŒ   s    r!   r¿   z&StashedUninstallPathSet.recovery_paths_  s   € ô �T—[‘[ 4×#8Ñ#8Ñ8Ó9Ð9r2   c                ó,   — t        | j                  «      S r%   )ÚboolrŠ   rŒ   s    r!   Úcan_rollbackz$StashedUninstallPathSet.can_rollbackd  s   € ä�D—K‘KÓ Ð r2   N©r.   ÚNone)r   rg   r.   rg   )r´   rg   rµ   rg   r.   rÉ   )r.   ztuple[tuple[str, str], ...]©r.   rÆ   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rŽ   r•   rœ   r­   r°   r¶   r½   rÂ   Úpropertyr¿   rÇ   rb   r2   r!   r‡   r‡   Ë   sX   „ ñ&ó:óóó6 óDóó(ó(ð ò:ó ð:ð ò!ó ñ!r2   r‡   c                  óv   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zddd„Zdd„Z	e
dd„«       Zdd	„Zdd
„Zedd„«       Zy)ÚUninstallPathSetzMA set of file paths to be removed in the uninstallation of a
    requirement.c                ó¶   — t        «       | _        t        «       | _        i | _        || _        t        «       | _        t        j                  t        «      | _
        y r%   )r&   Ú_pathsÚ_refuseÚ_pthÚ_distr‡   Ú_moved_pathsr/   Ú	lru_cacher   Ú_normalize_path_cached)r�   r>   s     r!   rŽ   zUninstallPathSet.__init__m  sB   € Ü #£ˆŒÜ!$£ˆŒØ46ˆŒ	ØˆŒ
Ü3Ó5ˆÔô '0×&9Ñ&9¼.Ó&IˆÕ#r2   c                ót   — t        «       sy|j                  | j                  t        j                  «      «      S )zs
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        T)r   r\   rÙ   ÚsysÚprefix)r�   r   s     r!   Ú
_permittedzUninstallPathSet._permittedx  s+   € ô (Ô)ØØ�‰˜t×:Ñ:¼3¿:¹:ÓFÓGÐGr2   c                ó0  — t         j                  j                  |«      \  }}t         j                  j                  | j	                  |«      t         j                  j                  |«      «      }t         j                  j                  |«      sy | j                  |«      r| j                  j                  |«       n| j                  j                  |«       t         j                  j                  |«      d   dk(  r| j                  t        |«      «       y y )Né   r6   )r   r   r=   r   rÙ   rX   r¡   rÝ   rÓ   r'   rÔ   Úsplitextr   )r�   r   rš   Útails       r!   r'   zUninstallPathSet.addƒ  s¿   € Ü—W‘W—]‘] 4Ó(‰
ˆˆdô �w‰w�|‰|˜D×7Ñ7¸Ó=¼r¿w¹w×?OÑ?OÐPTÓ?UÓVˆä�w‰w�~‰~˜dÔ#ØØ�?‰?˜4Ô Ø�K‰K�O‰O˜DÕ!à�L‰L×Ñ˜TÔ"ô �7‰7×Ñ˜DÓ! !Ñ$¨Ò-Ø�H‰HÔ& tÓ,Õ-ð .r2   c                ó  — | j                  |«      }| j                  |«      rE|| j                  vrt        |«      | j                  |<   | j                  |   j	                  |«       y | j
                  j	                  |«       y r%   )rÙ   rÝ   rÕ   ÚUninstallPthEntriesr'   rÔ   )r�   Úpth_filer@   s      r!   Úadd_pthzUninstallPathSet.add_pth–  sf   € Ø×.Ñ.¨xÓ8ˆØ�?‰?˜8Ô$Ø˜tŸy™yÑ(Ü&9¸(Ó&C�—	‘	˜(Ñ#Ø�I‰I�hÑ×#Ñ# EÕ*à�L‰L×Ñ˜XÕ&r2   c                óP  — | j                   s+t        j                  d| j                  j                  «       y| j                  j                  › d| j                  j
                  › �}t        j                  d|«       t        «       5  |s| j                  |«      r§| j                  }t        | j                   «      }	 t        t        |«      «      D ])  }|j                  |«       t        j                  d|«       Œ+ | j                  j                  «       D ]  }|j!                  «        Œ t        j                  d|«       ddd«       y# t"        t$        f$ r? |j&                  r| j)                  «        ‚ |j+                  «        |j-                  «        ‚ w xY w# 1 sw Y   yxY w)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×   rx   rK   rU   r­   ÚverboserÕ   rh   Úremover“   r	   rÇ   r½   r°   rÂ   )r�   Úauto_confirmrë   Údist_name_versionÚmovedÚ
for_renamer   Úpths           r!   rì   zUninstallPathSet.removeŸ  sg  € ð �{Š{Ü�K‰KØIØ—
‘
×#Ñ#ôð à#Ÿz™z×2Ñ2Ð3°1°T·Z±Z×5KÑ5KÐ4LÐMÐÜ�‰Ð&Ð(9Ô:ä‹\ñ 	Ù˜t×7Ñ7¸Ô@Ø×)Ñ)�ä0°·±Ó=�
ðÜ &¤w¨zÓ':Ó ;ò N˜ØŸ™ DÔ)ÜŸ™Ð'FÈÕMðNð  $Ÿy™y×/Ñ/Ó1ò %˜ØŸ
™
�ð%ô —K‘KÐ =Ð?PÔQ÷	ð 	øô  Ô!3Ð4ò Ø×)Ò)ØŸ™œð ð Ÿ™œØ×4Ñ4Ô6Øðú÷	ð 	ús    Â5FÂ=BEÅAFÆFÆF%c                ó"  — d	d„}|st        | j                  «      \  }}nt        | j                  «      }t        «       } |d|«        |d|«        |d| j                  «       |r |dt	        | j                  «      «       t        dd«      dk7  S )
z@Display which files would be deleted and prompt for confirmationc                óÐ   — |sy t         j                  | «       t        «       5  t        t	        |«      «      D ]  }t         j                  |«       Œ 	 d d d «       y # 1 sw Y   y xY wr%   )r¸   r¹   r   rK   rU   )ÚmsgrO   r   s      r!   Ú_displayz6UninstallPathSet._allowed_to_proceed.<locals>._displayÇ  sR   € ÙØä�K‰K˜ÔÜ“ñ &Ü"¤7¨5£>Ó2ò &�DÜ—K‘K Õ%ñ&÷&÷ &ñ &ús   £/AÁA%z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ÚnrI   r÷   )rô   rg   rO   úIterable[str]r.   rÉ   )r…   rÓ   r&   rÔ   rx   r   )r�   rë   rõ   r{   r|   s        r!   rê   z$UninstallPathSet._allowed_to_proceedÄ  s…   € ó	&ñ Ü%@ÀÇÁÓ%MÑ"ˆK™ô ˜dŸk™kÓ*ˆKÜ›ˆIá� +Ô.ÙÐ>À	ÔJÙÐ8¸$¿,¹,ÔGÙÙÐ*Ô,?ÀÇÁÓ,LÔMäÐ$ nÓ5¸Ñ<Ð<r2   c                ó.   — | j                   j                  S r%   )r×   rÇ   rŒ   s    r!   rÇ   zUninstallPathSet.can_rollbackà  s   € à× Ñ ×-Ñ-Ð-r2   c                óø  — | j                   sA| j                  j                  s+t        j	                  d| j
                  j                  «       yt        j                  d| j
                  j                  «       	 | j                  j                  «        | j                  j                  «        | j                  j                  «       D ]  }|j                  «        Œ y# | j                  j                  «        w xY w)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Õ   rh   )r�   rñ   s     r!   r½   zUninstallPathSet.rollbackä  s¹   € ð × Ò ¨×):Ñ):×)IÒ)IÜ�L‰LØ9Ø—
‘
×#Ñ#ôð Ü�‰Ð2°D·J±J×4GÑ4GÔHð	7Ø×Ñ×&Ñ&Ô(à×Ñ×4Ñ4Ô6Ø—9‘9×#Ñ#Ó%ò 	ˆCØ�L‰L�Nñ	øð ×Ñ×4Ñ4Õ6ús   Á9C ÃC9c                ó8   — | j                   j                  «        y)z?Remove temporary save dir: rollback will no longer be possible.N)r×   r°   rŒ   s    r!   r°   zUninstallPathSet.commitõ  s   € à×Ñ× Ñ Õ"r2   c           
     ó@  — |j                   }|j                  }|€(t        j                  d|j                  «        | |«      S t        |«      }|j                  s8t        j                  d|j                  |t        j                  «        | |«      S |t        j                  d«      t        j                  d«      hD �ch c]  }|r|’Œ c}v r)t        j                  d|j                  |«        | |«      S  | |«      }t        |j                  «      }|j                  xrF |d uxr@ t        j                  j!                  |«      xr |j#                  |j$                  › d�«       }|�r:|�|j'                  |«       |j)                  «       }	|	�8|	D ]1  }
|j'                  t        j                  j+                  ||
«      «       Œ3 �nÏ|j-                  d«      �r½	 |j/                  d«      }|j1                  d	¬
«      }|j/                  d«      j1                  «       D �cg c]
  }|r||vr|‘Œ c}D ]o  }t        j                  j+                  ||«      }|j'                  |«       |j'                  |› d�«       |j'                  |› d�«       |j'                  |› d�«       Œq �nò|j4                  rt7        |¬«      ‚|j8                  r‡|j'                  |«       t        j                  j;                  |«      d   }t        j                  j+                  t        j                  j=                  |«      d«      }|j?                  |d|z   «       �nG|j@                  r#tC        |«      D ]  }|j'                  |«       Œ �n|rÿtE        |«      5 }t        j                  jG                  |jI                  «       jK                  «       «      }|jM                  |«      }d d d «       t        j                  jO                  |«      sJ d|› d› d|j                  › d|› d�	«       ‚|j'                  |«       t        j                  j+                  t        j                  j=                  |«      d«      }|j?                  ||«       nt        jQ                  d||«       |jR                  rtU        «       }n
tW        «       }	 |jY                  «       D ]j  }|j'                  t        j                  j+                  ||«      «       tZ        sŒ9|j'                  t        j                  j+                  ||› d�«      «       Œl 	 	 	 	 	 	 	 dd„} |||«      D ]  }|j'                  |«       Œ |S c c}w # t2        $ r g }Y �Œww xY wc c}w # 1 sw Y   �Œ§xY w# t2        t\        f$ r Y Œew xY w)Nz-Not uninstalling %s since it is not installedz1Not uninstalling %s at %s, outside environment %sÚstdlibÚ
platstdlibz<Not uninstalling %s at %s, as it is in the standard library.z	.egg-infoztop_level.txtznamespace_packages.txtF)Úkeependsr6   r8   r9   r4   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.batc              3  óú   K  — | j                  «       D ]`  }|j                  dk(  r t        ||j                  d«      E d {  –—†  Œ2|j                  dk(  sŒBt        ||j                  d«      E d {  –—†  Œb y 7 Œ77 Œ	­w)NÚconsole_scriptsFÚgui_scriptsT)Úiter_entry_pointsÚgroupr"   r¬   )r>   r   Úentry_points      r!   Úiter_scripts_to_removez:UninstallPathSet.from_dist.<locals>.iter_scripts_to_remove‡  sv   è ø€ ð  $×5Ñ5Ó7ò N�Ø×$Ñ$Ð(9Ò9Ü,¨W°k×6FÑ6FÈÓN×NÑNØ ×&Ñ&¨-Ó7Ü,¨W°k×6FÑ6FÈÓM×MÑMñ	NàNøàMús(   ‚=A;¿A7Á A;ÁA;Á/A9Á0A;Á9A;)r>   r   r   rg   r.   úGenerator[str, None, None])/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Ú
splitlinesÚFileNotFoundErrorÚinstalled_by_distutilsr
   Úinstalled_as_eggr=   rN   rå   Úinstalled_with_dist_inforC   ÚopenrX   ÚreadlineÚstriprÙ   Úsamefilerº   Úin_usersiter   r   Úiter_distutils_script_namesr   ÚNotADirectoryError)Úclsr>   Údist_locationr	  Únormalized_dist_locationro   Úpaths_to_removeÚdevelop_egg_linkÚsetuptools_flat_installationÚinstalled_filesÚinstalled_fileÚnamespace_packagesÚ
namespacesÚtop_level_pkgr   Úeasy_install_eggÚeasy_install_pthÚfhÚlink_pointerÚnormalized_link_pointerr   Úscriptr  Úss                           r!   Ú	from_distzUninstallPathSet.from_distù  s`  € àŸ™ˆØ×*Ñ*ˆØÐ Ü�K‰KØ?Ø×#Ñ#ôñ �t“9Ðä#1°-Ó#@Ð Ø�zŠzÜ�K‰KØCØ×#Ñ#Ø(Ü—
‘
ô	ñ �t“9Ðà#ä×(Ñ(¨Ó2´I×4FÑ4FÀ|Ó4TÐUö(
àÙò ò(
ñ 
ô
 �K‰KØNØ×#Ñ#Ø(ôñ
 �t“9Ðá˜d›)ˆÜ6°t·}±}ÓEÐð ×3Ñ3ò SØ TÐ)òSä—‘—‘˜}Ó-òSð
 "×*Ñ*¨d×.FÑ.FÐ-GÀyÐ+QÓRÐRð 	%ò (ØÐ(Ø×#Ñ# MÔ2Ø"×8Ñ8Ó:ˆOØÐ*Ø&5ò U�NØ#×'Ñ'¬¯©¯©°]ÀNÓ(SÕTòUð
 —‘˜oÕ.ðOØ)-¯©Ð8PÓ)QÐ&ð "4×!>Ñ!>ÈÐ!>Ó!N�Jð "Ÿ^™^¨OÓ<×GÑGÓIö&àÙ˜Q jÑ0ò ò&ò 	7�Mô
 Ÿ7™7Ÿ<™<¨°}ÓE�DØ#×'Ñ'¨Ô-Ø#×'Ñ'¨4¨&°¨Ô5Ø#×'Ñ'¨4¨&°¨Ô6Ø#×'Ñ'¨4¨&°¨Õ6ò	7ð ×(Ò(Ü(°dÔ;Ð;à×"Ò"ð ×ÑÐ 8Ô9Ü!Ÿw™wŸ}™}Ð-EÓFÀqÑIÐÜ!Ÿw™wŸ|™|Ü—‘—‘Ð 8Ó9Ø"ó Ðð ×#Ñ#Ð$4°dÐ=MÑ6MÖNà×*Ò*Ü,¨TÓ2ò *�Ø×#Ñ# DÕ)ò*ñ ô Ð&Ó'ð ¨2Ü!Ÿw™w×/Ñ/°·±³×0CÑ0CÓ0EÓF�Ø*9×*PÑ*PØ ó+Ð'÷ô
 —7‘7×#Ñ#Ø'Ð)Aôð ð Ð,Ð-¨U°<°.ð A)Ø)-¯©¨°u¸]¸OÈ1ðNóð ð ×ÑÐ 0Ô1Ü!Ÿw™wŸ|™|Ü—‘—‘Ð 0Ó1Ð3Eó Ðð ×#Ñ#Ð$4°mÕDô �L‰LØ;ØØôð ×ÒÜ"“n‰Gä$Ó&ˆGð	Ø×:Ñ:Ó<ò P�Ø×#Ñ#¤B§G¡G§L¡L°¸&Ó$AÔBÞØ#×'Ñ'¬¯©¯©°WÀÀÈ¸oÓ(NÕOñPð	NØ"ð	Nàð	Nð (ó	Nñ (¨¨gÓ6ò 	#ˆAØ×Ñ Õ"ð	#ð ÐùòM(
øôT )ò $Ø!#“Jð$üò&÷Hñ ûôF "Ô#5Ð6ò 	Ùð	úsD   Â?U"ÇU' ÈU9ÎAU>Ò9AV Ô4V Õ'U6Õ5U6Õ>VÖVÖVN)r>   r   r.   rÉ   )r   rg   r.   rÆ   )r   rg   r.   rÉ   )rä   rg   r@   rg   r.   rÉ   )FF)rí   rÆ   rë   rÆ   r.   rÉ   )rë   rÆ   r.   rÆ   rÊ   rÈ   )r>   r   r.   rÑ   )rË   rÌ   rÍ   rÎ   rŽ   rÝ   r'   rå   rì   rê   rÏ   rÇ   r½   r°   Úclassmethodr0  rb   r2   r!   rÑ   rÑ   i  s\   „ ñó	Jó	Hó.ó&'ô#óJ=ð8 ò.ó ð.óó"#ð òZó ñZr2   rÑ   c                  ó,   — e Zd Zdd„Zdd„Zdd„Zd	d„Zy)
rã   c                ó>   — || _         t        «       | _        d | _        y r%   )Úfiler&   r?   Ú_saved_lines)r�   rä   s     r!   rŽ   zUninstallPthEntries.__init__˜  s   € ØˆŒ	Ü!$£ˆŒØ04ˆÕr2   c                óì   — t         j                  j                  |«      }t        r4t         j                  j	                  |«      d   s|j                  dd«      }| j                  j                  |«       y )Nr   ú\ú/)r   r   rX   r   Ú
splitdriveÚreplacer?   r'   )r�   r@   s     r!   r'   zUninstallPthEntries.add�  sS   € Ü—‘× Ñ  Ó'ˆõ œ2Ÿ7™7×-Ñ-¨eÓ4°QÒ7Ø—M‘M $¨Ó,ˆEØ�‰×Ñ˜Õr2   c                óP  — t         j                  d| j                  «       t        j                  j                  | j                  «      s!t         j                  d| j                  «       y t        | j                  d«      5 }|j                  «       }|j                  «       | _
        d d d «       t        d„ D «       «      rd}nd}|r=|d   j                  |j                  d«      «      s|d   |j                  d«      z   |d<   | j                  D ]<  }	 t         j                  d	|«       |j                  ||z   j                  d«      «       Œ> t        | j                  d
«      5 }|j#                  |«       d d d «       y # 1 sw Y   ŒÛxY w# t         $ r Y Œ‡w xY w# 1 sw Y   y xY w)NzRemoving pth entries from %s:z.Cannot remove entries from nonexistent file %sÚrbc              3  ó$   K  — | ]  }d |v –— Œ
 y­w)s   
Nrb   )r]   Úlines     r!   r`   z-UninstallPthEntries.remove.<locals>.<genexpr>¸  s   è ø€ Ò1 4ˆw˜$ŒÑ1ùs   ‚z
ú
rH   zutf-8zRemoving entry: %sÚwb)r¸   rë   r4  r   r   rz   Úwarningr  Ú	readlinesÚcopyr5  ri   r<   Úencoder?   rì   Ú
ValueErrorÚ
writelines)r�   r+  ÚlinesÚendliner@   s        r!   rì   zUninstallPthEntries.remove¬  s^  € Ü�‰Ð6¸¿	¹	ÔBô �w‰w�~‰~˜dŸi™iÔ(Ü�N‰NÐKÈTÏYÉYÔWØä�$—)‘)˜TÓ"ð 	- bØ—L‘L“NˆEØ %§
¡
£ˆDÔ÷	-ô Ñ1¨5Ô1Ô1Ø‰GàˆGá˜˜r™×+Ñ+¨G¯N©N¸7Ó,CÔDØ˜b™	 G§N¡N°7Ó$;Ñ;ˆE�"‰Ià—\‘\ò 	ˆEðÜ—‘Ð3°UÔ;Ø—‘˜e g™o×5Ñ5°gÓ>Õ?ð	ô �$—)‘)˜TÓ"ð 	! bØ�M‰M˜%Ô ÷	!ð 	!÷'	-ð 	-ûô  ò Ùðú÷	!ð 	!ús*   Â&FÄ9FÅ&FÆF
Æ	FÆFÆF%c                ó”  — | j                   €!t        j                  d| j                  «       yt        j	                  d| j                  «       	 t        | j                  d«      5 }|j                  | j                   «       d d d «       y# 1 sw Y   yxY w# t        t        f$ r" t        j                  d| j                  «       ‚ w xY 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)	r5  r¸   rÀ   r4  rº   r  rF  r“   r	   )r�   r+  s     r!   r½   zUninstallPthEntries.rollbackÊ  s¨   € Ø×ÑÐ$Ü�L‰LÐIÈ4Ï9É9ÔUØä�‰Ð8¸$¿)¹)ÔDð	Ü�d—i‘i Ó&ð 1¨"Ø—‘˜d×/Ñ/Ô0÷1ð ÷1ð ûô Ô+Ð,ò 	Ü�L‰LØHÈ$Ï)É)ôð ð		ús*   ÁB Á%B
ÂB Â
BÂB ÂB Â1CN)rä   rg   r.   rÉ   )r@   rg   r.   rÉ   rÈ   rÊ   )rË   rÌ   rÍ   rŽ   r'   rì   r½   rb   r2   r!   rã   rã   —  s   „ ó5ó
 ó!ô<r2   rã   )r   rg   r   rg   r   rÆ   r.   r  )r,   ú)Callable[..., Generator[Any, None, None]]r.   rJ  )r>   r   r.   r  )rO   rø   r.   zset[str])rO   rø   r.   ztuple[set[str], set[str]])3Ú
__future__r   r/   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"   r1   rC   rU   rx   r…   r‡   rÑ   rã   rb   r2   r!   ú<module>rX     sÜ   ðÝ "ã Û 	Û Û 
Û ß 9Ñ 9Ý ,Ý ÷ñ ÷
 AÝ 3Ý .Ý Dß =ß @Ñ @ß MÝ Cá	�8Ó	€ð&Øð&Ø"ð&Ø,0ð&àó&ð&Ø1ðà.óð 	òó 	ðóBó0AóD."÷b[!ñ [!÷|kñ k÷\	Bò Br2   