Ë
    ��h^  ã                   ó  — 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mZmZmZmZ d dl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"m#Z# d dl$m%Z%m&Z& d dl'm(Z(  ee)«      Z*de+de+de,de
e+ddf   fd„Z-dede
eddf   f   dede
eddf   f   fd„Z.e.dede
e+ddf   fd„«       Z/dee+   dee+   fd„Z0dee+   dee+   fd„Z1dee+   deee+   ee+   f   fd„Z2 G d„ d«      Z3 G d„ d«      Z4 G d„ d «      Z5y)!é    N)Úcache_from_source)	ÚAnyÚCallableÚDictÚ	GeneratorÚIterableÚListÚOptionalÚSetÚTuple)ÚLegacyDistutilsInstallÚUninstallMissingRecord)Úget_bin_prefixÚget_bin_user)ÚBaseDistribution)ÚWINDOWS)Úegg_link_path_from_location)Ú	getLoggerÚ
indent_log)ÚaskÚnormalize_pathÚrenamesÚrmtree)ÚAdjacentTempDirectoryÚTempDirectory)Úrunning_under_virtualenvÚbin_dirÚscript_nameÚis_guiÚreturnc              #   ó    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   )r   r   r   Úexe_names       ú]/var/www/skyplay_api_hub/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Úfn.c           
      ó|   ‡ — t        j                  ‰ «      dt        dt        dt        t        d d f   fˆ fd„«       }|S )NÚargsÚkwr    c               ?   óp   •K  — t        «       } ‰| i |¤ŽD ]  }||vsŒ|j                  |«       |–— Œ y ­w©N)ÚsetÚadd)r*   r+   ÚseenÚitemr(   s       €r&   Úuniquez_unique.<locals>.unique+   s=   øè ø€ ä›ˆÙ˜�O ‘Oò 	ˆDØ˜4ÒØ—‘˜”Ø“
ñ	ùs   ƒ6ž6)Ú	functoolsÚwrapsr   r   )r(   r2   s   ` r&   Ú_uniquer5   (   sG   ø€ ô ‡_�_�RÓð”cð ¤ð ¬´3¸¸d°?Ñ)Cô ó ðð €Mó    Údistc              #   óÖ  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)r7   r?   ÚentriesÚentryr#   Údnr(   Úbases           r&   Úuninstallation_pathsrG   6   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)Úpathsc                 óÐ   ‡‡— t         j                  j                  Št        «       }t	        | t
        ¬«      D ]+  Št        ˆˆfd„|D «       «      }|rŒ|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.©Úkeyc              3   óÀ   •K  — | ]U  }‰j                  |j                  d «      «      xr/ ‰t        |j                  d «      j                  ‰«      «         ‰k(  –— ŒW y­w)Ú*N)Ú
startswithÚrstripÚlen)Ú.0Ú	shortpathr#   Úseps     €€r&   ú	<genexpr>zcompact.<locals>.<genexpr>a   sc   øè ø€ ò 
ð ð �O‰O˜I×,Ñ,¨SÓ1Ó2ò DØ”S˜×)Ñ)¨#Ó.×5Ñ5°cÓ:Ó;Ñ<ÀÑCóDñ
ùs   ƒAA)r"   r#   rS   r.   ÚsortedrP   Úanyr/   )rH   Úshort_pathsÚshould_skipr#   rS   s      @@r&   ÚcompactrY   X   sa   ù€ ô �'‰'�+‰+€CÜ›E€KÜ�u¤#Ô&ò "ˆÜô 
ð )ô
ó 
ˆò
 Ø�O‰O˜DÕ!ð"ð Ðr6   c                 ó  ‡
‡‡— | D �ci c]"  }t         j                  j                  |«      |“Œ$ }}t        |«      }t	        |j                  «       D �ch c]$  }t         j                  j                  |«      d   ’Œ& c}t        ¬«      }t        «       }dt        dt        f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   rJ   Úar    c                  ót   — t         j                  j                  t        j                  j                  | Ž «      S r-   )r"   r#   Únormcaser$   )r[   s    r&   Ú	norm_joinz&compress_for_rename.<locals>.norm_joinv   s$   € Ü�w‰w×Ñ¤§¡§¡¨aÐ 0Ó1Ð1r6   c              3   óz   •K  — | ]2  }t         j                  j                  ‰«      j                  |«      –— Œ4 y ­wr-   )r"   r#   r]   rN   )rQ   ÚwÚroots     €r&   rT   z&compress_for_rename.<locals>.<genexpr>z   s+   øè ø€ ÒG¸Œr�w‰w×Ñ Ó%×0Ñ0°×3ÑGùs   ƒ8;c              3   ó2   •K  — | ]  } ‰‰‰|«      –— Œ y ­wr-   © )rQ   ÚdÚdirnamer^   ra   s     €€€r&   rT   z&compress_for_rename.<locals>.<genexpr>�   s   øè ø€ ÒL¸q™y¨¨w¸×:ÑLùó   ƒc              3   ó2   •K  — | ]  } ‰‰‰|«      –— Œ y ­wr-   rc   )rQ   Úfre   r^   ra   s     €€€r&   rT   z&compress_for_rename.<locals>.<genexpr>‚   s   øè ø€ ÒH¸Q™Y t¨W°a×8ÑHùrf   )r"   r#   r]   r.   rU   ÚvaluesrB   rP   ÚstrrV   ÚwalkÚupdateÚdifference_updater/   rS   ÚmapÚ__getitem__)rH   ÚpÚcase_mapÚ	remainingÚ	uncheckedÚ	wildcardsÚ	all_filesÚall_subdirsÚsubdirsÚfilesre   r^   ra   s             @@@r&   Úcompress_for_renamery   k   sJ  ú€ ð 16Ö6¨1”—‘× Ñ  Ó# QÑ&Ð6€HÐ6Ü�H“€IÜ°X·_±_Ó5FÖG°œŸ™Ÿ™ aÓ(¨Ó+ÒGÌSÔQ€IÜ›%€Ið2”cð 2œcó 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   ˆ'FÁ)F	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.
    r=   z__init__.pyz
.dist-inforM   )r.   rA   r/   r"   r#   re   rn   r]   rY   rk   r$   Úisfile)rH   Úwill_removeÚ	will_skipÚfoldersrx   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                   ón   — e Zd ZdZdd„Zdedefd„Zdedefd„Zdedefd„Zdd	„Z	dd
„Z
edefd„«       Zy)ÚStashedUninstallPathSetzWA set of file rename operations to stash files while
    tentatively uninstalling them.r    Nc                 ó    — i | _         g | _        y r-   )Ú
_save_dirsÚ_moves©Úselfs    r&   Ú__init__z StashedUninstallPathSet.__init__Â   s   € ð 57ˆŒð .0ˆ�r6   r#   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#   r]   )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#   r]   re   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                  |«      }| j                  j                  ||f«       |r4t         j                  j                  |«      rt        j                  |«       t        ||«       |S )z�Stashes the directory or file and returns its new location.
        Handle symlinks as files to avoid modifying the symlink targets.
        )
r"   r#   ÚisdirÚislinkr•   rœ   r‹   ÚappendÚrmdirr   )r�   r#   Úpath_is_dirÚnew_paths       r&   ÚstashzStashedUninstallPathSet.stashó   s”   € ô —g‘g—m‘m DÓ)ÒF´"·'±'·.±.ÀÓ2FÐ.FˆÙØ×0Ñ0°Ó6‰Hà×+Ñ+¨DÓ1ˆHà�‰×Ñ˜D (Ð+Ô,Ùœ2Ÿ7™7Ÿ=™=¨Ô2ô �H‰H�XÔÜ��hÔØˆr6   c                 ó~   — | j                   j                  «       D ]  }|j                  «        Œ g | _        i | _         y)z0Commits the uninstall by removing stashed files.N)rŠ   ri   Úcleanupr‹   )r�   r”   s     r&   ÚcommitzStashedUninstallPathSet.commit  s8   € àŸ™×.Ñ.Ó0ò 	ˆHØ×ÑÕð	àˆŒØˆ�r6   c                 ób  — | j                   D ]  }t        j                  dg|¢­Ž  Œ | j                   D ]§  \  }}	 t        j                  d||«       t        j
                  j                  |«      st        j
                  j                  |«      rt	        j                  |«       n*t        j
                  j                  |«      rt        |«       t        ||«       Œ© | j                  «        y# t        $ r6}t        j                  d|«       t        j                  d|«       Y d}~Œõd}~ww xY w)z2Undoes the uninstall by moving stashed files back.zMoving to %s
 from %szReplacing %s from %szFailed to restore %szException: %sN)r‹   ÚloggerÚinfoÚdebugr"   r#   r{   rŸ   Úunlinkrž   r   r   r“   Úerrorr§   )r�   rp   r£   r#   Úexs        r&   Úrollbackz StashedUninstallPathSet.rollback  sà   € à—‘ò 	6ˆAÜ�K‰KÐ0Ð5°1Ô5ð	6ð #Ÿk™kò 
	2‰NˆH�dð	2Ü—‘Ð3°X¸tÔDÜ—7‘7—>‘> (Ô+¬r¯w©w¯~©~¸hÔ/GÜ—I‘I˜hÕ'Ü—W‘W—]‘] 8Ô,Ü˜8Ô$Ü˜˜hÕ'ð
	2ð 	�‰�øô	 ò 2Ü—‘Ð3°XÔ>Ü—‘˜_¨b×1Ñ1ûð2ús   »B!C/Ã/	D.Ã8,D)Ä)D.c                 ó,   — t        | j                  «      S r-   )Úboolr‹   rŒ   s    r&   Úcan_rollbackz$StashedUninstallPathSet.can_rollback"  s   € ä�D—K‘KÓ Ð r6   ©r    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rŽ   rj   r•   rœ   r¤   r§   r¯   Úpropertyr±   r²   rc   r6   r&   rˆ   rˆ   ¾   sj   „ ñ&ó0ð¨ð °ó ð Cð ¨Có ð6˜#ð  #ó ó*óð& ð!˜dò !ó ñ!r6   rˆ   c                   ó¤   — e Zd ZdZdeddfd„Zdedefd„Zdeddfd„Z	d	ed
eddfd„Z
ddededdfd„Zdedefd„Zdd„Zdd„Zededd fd„«       Zy)ÚUninstallPathSetzMA set of file paths to be removed in the uninstallation of a
    requirement.r7   r    Nc                 ó¶   — t        «       | _        t        «       | _        i | _        || _        t        «       | _        t        j                  t        «      | _
        y r-   )r.   Ú_pathsÚ_refuseÚ_pthÚ_distrˆ   Ú_moved_pathsr3   Ú	lru_cacher   Ú_normalize_path_cached)r�   r7   s     r&   rŽ   zUninstallPathSet.__init__+  sB   € Ü #£ˆŒÜ!$£ˆŒØ46ˆŒ	ØˆŒ
Ü3Ó5ˆÔô '0×&9Ñ&9¼.Ó&IˆÕ#r6   r#   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   rN   rÂ   ÚsysÚprefix)r�   r#   s     r&   Ú
_permittedzUninstallPathSet._permitted6  s+   € ô (Ô)ØØ�‰˜t×:Ñ:¼3¿:¹:ÓFÓGÐGr6   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é   r;   )r"   r#   rB   r$   rÂ   r]   ÚexistsrÆ   r¼   r/   r½   Úsplitextr   )r�   r#   rš   Útails       r&   r/   zUninstallPathSet.addA  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Ó,Õ-ð .r6   Úpth_filerD   c                 ó  — | j                  |«      }| j                  |«      rE|| j                  vrt        |«      | j                  |<   | j                  |   j	                  |«       y | j
                  j	                  |«       y r-   )rÂ   rÆ   r¾   ÚUninstallPthEntriesr/   r½   )r�   rÌ   rD   s      r&   Úadd_pthzUninstallPathSet.add_pthT  sf   € Ø×.Ñ.¨xÓ8ˆØ�?‰?˜8Ô$Ø˜tŸy™yÑ(Ü&9¸(Ó&C�—	‘	˜(Ñ#Ø�I‰I�hÑ×#Ñ# EÕ*à�L‰L×Ñ˜XÕ&r6   Úauto_confirmÚverbosec                 ó¬  — | 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# 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À   ry   rU   rY   r¤   rÑ   r¾   ri   Úremove)r�   rÐ   rÑ   Údist_name_versionÚmovedÚ
for_renamer#   Úpths           r&   r×   zUninstallPathSet.remove]  s  € ð �{Š{Ü�K‰KØIØ—
‘
×#Ñ#ôð à#Ÿz™z×2Ñ2Ð3°1°T·Z±Z×5KÑ5KÐ4LÐMÐÜ�‰Ð&Ð(9Ô:ä‹\ñ 	NÙ˜t×7Ñ7¸Ô@Ø×)Ñ)�ä0°·±Ó=�
ä"¤7¨:Ó#6Ó7ò J�DØ—K‘K Ô%Ü—N‘NÐ#BÀDÕIðJð  Ÿ9™9×+Ñ+Ó-ò !�CØ—J‘J•Lð!ô —‘Ð9Ð;LÔM÷	N÷ 	Nñ 	Nús   ÂB:E
Å
Ec                 óL  — dt         dt        t            ddf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 confirmationÚmsgrH   r    Nc                 óÐ   — |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   rU   rY   )rÝ   rH   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ÚnÚ rá   )rj   r   r†   r¼   r.   r½   ry   r   )r�   rÑ   rß   r|   r}   s        r&   rÖ   z$UninstallPathSet._allowed_to_proceedz  sž   € ð	&œ#ð 	&¤h¬s¡mð 	&¸ó 	&ñ Ü%@ÀÇÁÓ%MÑ"ˆK™ô ˜dŸk™kÓ*ˆKÜ›ˆIá� +Ô.ÙÐ>À	ÔJÙÐ8¸$¿,¹,ÔGÙÙÐ*Ô,?ÀÇÁÓ,LÔMäÐ$ nÓ5¸Ñ<Ð<r6   c                 ól  — | j                   j                  s+t        j                  d| j                  j
                  «       yt        j                  d| j                  j
                  «       | j                   j                  «        | j                  j                  «       D ]  }|j                  «        Œ y)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¾   ri   )r�   rÛ   s     r&   r¯   zUninstallPathSet.rollback–  s‚   € à× Ñ ×-Ò-Ü�L‰LØ9Ø—
‘
×#Ñ#ôð Ü�‰Ð2°D·J±J×4GÑ4GÔHØ×Ñ×"Ñ"Ô$Ø—9‘9×#Ñ#Ó%ò 	ˆCØ�L‰L�Nñ	r6   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   € à×Ñ× Ñ Õ"r6   c           
      ól  — |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t^        dt`        dtb        t`        d d f   fd„} |||«      D ]  }|j'                  |«       Œ |S c c}w # t2        $ r g }Y �Œ�w xY wc c}w # 1 sw Y   �Œ½xY w# t2        t\        f$ r Y Œ{w 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)Úkeependsr;   r=   r>   r9   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.batr7   r   r    c              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'   Úname)r7   r   Úentry_points      r&   Úiter_scripts_to_removez:UninstallPathSet.from_dist.<locals>.iter_scripts_to_remove5  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;)2r?   Úinfo_locationr©   rª   Úcanonical_namer   ÚlocalrÄ   rÅ   Ú	sysconfigÚget_pathr   rÔ   Ú"installed_with_setuptools_egg_infor"   r#   rÉ   rA   Úsetuptools_filenamer/   r@   r$   Úis_fileÚ	read_textÚ
splitlinesÚFileNotFoundErrorÚinstalled_by_distutilsr   Úinstalled_as_eggrB   re   rÏ   Úinstalled_with_dist_inforG   Úopenr]   ÚreadlineÚstriprÂ   Úsamefiler«   Úin_usersiter   r   Úiter_distutils_script_namesr   ÚNotADirectoryErrorr   rj   r   )Úclsr7   Údist_locationrò   Únormalized_dist_locationrp   Ú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§  sk  € àŸ™ˆØ×*Ñ*ˆØÐ Ü�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ô ”s˜D $�Ñ'ó	Nñ (¨¨gÓ6ò 	#ˆAØ×Ñ Õ"ð	#ð ÐùòM(
øôT )ò $Ø!#“Jð$üò&÷Hñ ûôF "Ô#5Ð6ò 	Ùð	úsD   Â?U8ÇU= ÈVÎAVÒ9AV! Ô4V! Õ=VÖVÖVÖ!V3Ö2V3)FFr³   )r´   rµ   r¶   r·   r   rŽ   rj   r±   rÆ   r/   rÏ   r×   rÖ   r¯   r§   Úclassmethodr  rc   r6   r&   rº   rº   '  sÄ   „ ñð	JÐ-ð 	J°$ó 	Jð	H˜sð 	H tó 	Hð.˜ð . ó .ð&' ð '¨Cð '°Dó 'ñN 4ð N¸$ð NÈ4ó Nð:=¨4ð =°Dó =ó8ó#ð ðZÐ-ð ZÐ2Dò Zó ñZr6   rº   c                   ó@   — e Zd Zdeddfd„Zdeddfd„Zd	d„Zdefd„Zy)
rÎ   rÌ   r    Nc                 ó>   — || _         t        «       | _        d | _        y r-   )Úfiler.   rC   Ú_saved_lines)r�   rÌ   s     r&   rŽ   zUninstallPthEntries.__init__F  s   € ØˆŒ	Ü!$£ˆŒØ37ˆÕr6   rD   c                 óì   — t         j                  j                  |«      }t        r4t         j                  j	                  |«      d   s|j                  dd«      }| j                  j                  |«       y )Nr   ú\ú/)r"   r#   r]   r   Ú
splitdriveÚreplacerC   r/   )r�   rD   s     r&   r/   zUninstallPthEntries.addK  sS   € Ü—‘× Ñ  Ó'ˆõ œ2Ÿ7™7×-Ñ-¨eÓ4°QÒ7Ø—M‘M $¨Ó,ˆEØ�‰×Ñ˜Õr6   c                 ó4  — t         j                  d| j                  «       t        j                  j                  | j                  «      s!t         j                  d| j                  «       y t        | j                  d«      5 }|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   
Nrc   )rQ   Úlines     r&   rT   z-UninstallPthEntries.remove.<locals>.<genexpr>e  s   è ø€ Ò1 4ˆw˜$ŒÑ1ùs   ‚z
ú
éÿÿÿÿzutf-8zRemoving entry: %sÚwb)r©   rÑ   r  r"   r#   r{   Úwarningr   Ú	readlinesr  rV   rA   ÚencoderC   r×   Ú
ValueErrorÚ
writelines)r�   r  ÚlinesÚendlinerD   s        r&   r×   zUninstallPthEntries.removeZ  sX  € Ü�‰Ð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*   ÂE3Ä9E?ÅFÅ3E<Å?	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)Nz.Cannot roll back changes to %s, none were madeFz!Rolling %s back to previous stater*  T)r  r©   r­   r  r«   r   r/  )r�   r  s     r&   r¯   zUninstallPthEntries.rollbacku  so   € Ø×ÑÐ$Ü�L‰LÐIÈ4Ï9É9ÔUØÜ�‰Ð8¸$¿)¹)ÔDÜ�$—)‘)˜TÓ"ð 	- bØ�M‰M˜$×+Ñ+Ô,÷	-à÷	-àús   Á$B	Â	Br³   )	r´   rµ   r¶   rj   rŽ   r/   r×   r±   r¯   rc   r6   r&   rÎ   rÎ   E  s9   „ ð8 ð 8¨ó 8ð
 ˜ð   ó  ó!ð6˜$ô r6   rÎ   )6r3   r"   rÄ   rõ   Úimportlib.utilr   Útypingr   r   r   r   r   r	   r
   r   r   Úpip._internal.exceptionsr   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   r   Úpip._internal.utils.temp_dirr   r   Úpip._internal.utils.virtualenvr   r´   r©   rj   r±   r'   r5   rG   rY   ry   r†   rˆ   rº   rÎ   rc   r6   r&   ú<module>r>     sk  ðÛ Û 	Û 
Û Ý ,ß W× WÕ Wç Sß @Ý 3Ý .Ý Dß =ß IÓ Iß MÝ Cá	�8Ó	€ð&Øð&Ø"ð&Ø,0ð&àˆs�D˜$ˆÑó&ð&Ø��i  T¨4 Ñ0Ð0Ñ1ðàˆc�9˜S $¨˜_Ñ-Ð-Ñ.óð 	ðÐ/ð °I¸cÀ4È¸oÑ4Nò ó 	ððB�8˜C‘=ð  S¨¡Xó ð&A˜x¨™}ð A°°S±ó AðD." x°¡}ð ."¸¸sÀ3¹xÈÈSÉÐ?QÑ9Ró ."÷bf!ñ f!÷R[ñ [÷|7ò 7r6   