관리-도구
편집 파일: req_uninstall.cpython-310.pyc
o ƚ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-d ede.de/de e. fdd�Z0de dee f de dee f fdd�Z1e1d edee. fdd��Z2dee. dee. fdd�Z3dee. dee. fdd�Z4dee. deee. ee. f fdd�Z5G d d!� 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 sr t | �rt� }nt� }tj�||�}|g}tr7|�|d � |�|d � |r0|�|d � |S |�|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-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/req/req_uninstall.py� _script_names s �r+ �fn.c s, t �� �dtdtdtt f� fdd��}|S )N�args�kwr! c ? s8 � 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 c c s. � z t �| �d��}W nL tyW } z@dj| d�}zt| �d��}|r'|dkr*t� �W n tttfyF d�| j | j �}|d�|�7 }Y nw |d�|�7 }t|�|�d }~ww |D ]:}tj �| j|d �}|V |�d�r�tj �|�\}} | d d� } tj �|| d �}|V tj �|| d �}|V qZd 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"