관리-도구
편집 파일: req_uninstall.cpython-36.pyc
3 �Pf� � @ 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|<