관리-도구
편집 파일: req_uninstall.cpython-39.pyc
a ��Re�\ � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm Z m Z mZmZm Z mZmZmZ d dlmZ d dlmZ d dlmZ d dlmZmZ d dlmZ d d lmZ d d lmZm Z d dl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( d dl)m*Z*m+Z+ ee,�Z-ee.e/e e. d �dd�Z0e dee f e dee f d�dd�Z1e1eee. d�dd��Z2ee. ee. d�dd�Z3ee. ee. d�dd�Z4ee. eee. ee. f d�dd�Z5G dd� d�Z6G d d!� d!�Z7G d"d#� d#�Z8dS )$� N)�cache_from_source) �Any�Callable�Dict�Iterable�Iterator�List�Optional�Set�Tuple)� pkg_resources)�Distribution)�UninstallationError)�get_bin_prefix�get_bin_user)�WINDOWS)�egg_link_path_from_location)� getLogger� indent_log)�ask�dist_in_usersite� dist_is_local�is_local�normalize_path�renames�rmtree)�AdjacentTempDirectory� TempDirectory)�dist�script_name�is_gui�returnc C sp t | �rt� }nt� }tj�||�}|g}trl|�|d � |�|d � |r^|�|d � n|�|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 z.exez .exe.manifestz-script.pywz -script.py)r r r �os�path�joinr �append)r r r �bin_dir�exe_name�paths_to_remove� r) ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/req/req_uninstall.py� _script_names s r+ .)�fnr! c s( t �� �tttt d�� fdd��}|S )N)�args�kwr! c ? s6 t � }� | i |��D ]}||vr|�|� |V qd S �N)�set�add)r- r. �seen�item�r, r) r* �unique5 s z_unique.<locals>.unique)� functools�wrapsr r )r, r5 r) r4 r* �_unique4 s r8 �r r! c c s8 zt �| �d��}W n� ty� } z�dj| d�}z$t| �d��}|rL|dkrRt� �W n6 tttfy� d�| j | j �}|d�|�7 }Y n0 |d�|�7 }t|�|�W Y d }~n d }~0 0 |D ]t}tj �| j|d �}|V |�d�r�tj �|�\}} | d d� } tj �|| d �}|V tj �|| 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 UninstallationError, with possible information from the INSTALLER file. https://packaging.python.org/specifications/recording-installed-packages/ �RECORDz/Cannot uninstall {dist}, RECORD file not found.)r � INSTALLER�pipz{}=={}zZ You might be able to recover from this via: 'pip install --force-reinstall --no-deps {}'.z' Hint: The package was installed by {}.Nr �.py����.pyc�.pyo)�csv�reader�get_metadata_lines�FileNotFoundError�format�next� ValueError�OSError� StopIteration�project_name�versionr r"