One Hat Cyber Team
Your IP :
3.17.62.86
Server IP :
162.241.123.123
Server :
Linux sh016.hostgator.in 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.6
/
site-packages
/
pip
/
req
/
__pycache__
/
View File Name :
req_uninstall.cpython-36.pyc
3 . g�������������������@���s����d�dl�mZ�d�dlZd�dlZd�dlZd�dlmZmZmZ�d�dl m Z �d�dlmZm Z mZmZmZ�d�dlmZ�eje�ZG�dd��de�ZG�d d ��d e�ZdS�)�����)�absolute_importN)�uses_pycache�WINDOWS�cache_from_source)�UninstallationError)�rmtree�ask�is_local�renames�normalize_path)� indent_logc���������������@���sZ���e�Zd�ZdZdd��Zdd��Zdd��Zdd ��Zd d��Zdd ��Z ddd�Z dd��Zdd��ZdS�)�UninstallPathSetzMA set of file paths to be removed in the uninstallation of a requirement.c�������������C���s,���t���|�_t���|�_i�|�_||�_d�|�_g�|�_d�S�)N)�set�paths�_refuse�pth�dist�save_dir�_moved_paths)�selfr�����r����#/usr/lib/python3.6/req_uninstall.py�__init__���s����zUninstallPathSet.__init__c�������������C���s���t�|�S�)zs Return True if the given path is one we are permitted to remove/modify, False otherwise. )r ���)r����pathr���r���r���� _permitted���s����zUninstallPathSet._permittedc�������������C���s����t�jj|�\}}t�jjt|�t�jj|��}t�jj|�s:d�S�|�j|�rR|�jj |��n|�j j |��t�jj|�d�dkr�tr�|�j t |���d�S�)N����z.py)�osr����split�joinr����normcase�existsr���r����addr����splitextr���r���)r���r����head�tailr���r���r���r!���#���s���� zUninstallPathSet.addc�������������C���sL���t�|�}|�j|�r<||�jkr*t|�|�j|<�|�j|�j|��n|�jj|��d�S�)N)r���r���r����UninstallPthEntriesr!���r���)r����pth_file�entryr���r���r����add_pth6���s���� zUninstallPathSet.add_pthc����������������s@���t���}x4t|td�D�]$��t��fdd�|D���s|j����qW�|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����������������s4���g�|�],}��j�|�o.��t|jtjj���tjjk�qS�r���)� startswith�len�rstripr���r����sep)�.0Z shortpath)r���r���r���� <listcomp>G���s���z,UninstallPathSet.compact.<locals>.<listcomp>)r����sortedr+����anyr!���)r���r���Zshort_pathsr���)r���r����compact?���s���� zUninstallPathSet.compactc�������������C���s&���t�jj|�jt�jj|�d�jt�jj��S�)Nr���)r���r���r���r���� splitdrive�lstripr-���)r���r���r���r���r����_stashM���s����zUninstallPathSet._stashFc�������������C���s:��|�j�stjd|�jj��dS�tjd|�jj|�jj��t�����t|�j|�j���}|rRd}n"x|D�]}tj|��qXW�t dd �}|�j r�tjd��x|�j|�j �D�]}tj|��q�W�|dk�r,tjdd d �|�_ x8|D�]0}|�j|�}tjd|��|�jj|��t||��q�W�x|�jj��D�]}|j����qW�tjd|�jj|�jj��W�dQ�R�X�dS�)z[Remove paths in ``self.paths`` with confirmation (unless ``auto_confirm`` is True).z7Can't uninstall '%s'. No files were found to uninstall.NzUninstalling %s-%s:�yzProceed (y/n)? �nz.Not removing or modifying (outside of prefix):z -uninstallzpip-)�suffix�prefixzRemoving file or directory %szSuccessfully uninstalled %s-%s)r6���r7���)r����logger�infor����project_name�versionr���r0���r2���r���r����tempfileZmkdtempr���r5����debugr����appendr ���r����values�remove)r���Zauto_confirmr���Zresponser����new_pathr���r���r���r���rB���Q���s@���� zUninstallPathSet.removec�������������C���s~���|�j�dkrtjd|�jj��dS�tjd|�jj��x.|�jD�]$}|�j|�}tjd|��t ||��q6W�x|�j j��D�]}|j���qjW�dS�)z1Rollback the changes previously made by remove().Nz'Can't roll back %s; was not uninstalledFzRolling back uninstall of %szReplacing %s) r���r:����errorr���r<���r;���r���r5���r?���r ���r���rA����rollback)r���r���Ztmp_pathr���r���r���r���rE���{���s���� zUninstallPathSet.rollbackc�������������C���s$���|�j�dk r t|�j���d|�_�g�|�_dS�)z?Remove temporary save dir: rollback will no longer be possible.N)r���r���r���)r���r���r���r����commit����s���� zUninstallPathSet.commitN)F) �__name__� __module__�__qualname__�__doc__r���r���r!���r(���r2���r5���rB���rE���rF���r���r���r���r���r ������s��� *r ���c���������������@���s,���e�Zd�Zdd��Zdd��Zdd��Zdd��Zd S�) r%���c�������������C���s0���t�jj|�std|���||�_t��|�_d�|�_d�S�)Nz.Cannot remove entries from nonexistent file %s)r���r����isfiler����filer����entries�_saved_lines)r���r&���r���r���r���r�������s���� zUninstallPthEntries.__init__c�������������C���s>���t�jj|�}tr.t�jj|�d��r.|jdd�}|�jj|��d�S�)Nr����\�/)r���r���r���r���r3����replacerM���r!���)r���r'���r���r���r���r!�������s����zUninstallPthEntries.addc�������������C���s����t�jd|�j��t|�jd��}|j��}||�_W�d�Q�R�X�tdd��|D���rLd}nd}xH|�jD�]>}y$t�jd|��|j||�j d���W�qX�t k r����Y�qXX�qXW�t|�jd ��}|j|��W�d�Q�R�X�d�S�) NzRemoving pth entries from %s:�rbc�������������s���s���|�]}d�|kV��qdS�)s��� Nr���)r.����liner���r���r���� <genexpr>����s����z-UninstallPthEntries.remove.<locals>.<genexpr>z � zRemoving entry: %szutf-8�wb)r:���r?���rL����open� readlinesrN���r1���rM���rB����encode� ValueError� writelines)r����fh�linesZendliner'���r���r���r���rB�������s���� zUninstallPthEntries.removec���������� ���C���sR���|�j�d�krtjd|�j��dS�tjd|�j��t|�jd��}|j|�j���W�d�Q�R�X�dS�)Nz.Cannot roll back changes to %s, none were madeFz!Rolling %s back to previous staterV���T)rN���r:���rD���rL���r?���rW���r[���)r���r\���r���r���r���rE�������s���� zUninstallPthEntries.rollbackN)rG���rH���rI���r���r!���rB���rE���r���r���r���r���r%�������s��� r%���)Z __future__r���Zloggingr���r>���Z pip.compatr���r���r���Zpip.exceptionsr���Z pip.utilsr���r���r ���r ���r���Zpip.utils.loggingr���Z getLoggerrG���r:����objectr ���r%���r���r���r���r����<module>���s��� �