Viewing File: /usr/lib/python3.6/site-packages/pip/req/__pycache__/req_uninstall.cpython-36.opt-1.pyc
3
aj @ s d dl mZ d dlZd dlZd dlZd dlmZmZmZ d dl m
Z
d dlmZm
Z
mZmZmZ d dlmZ ejeZG dd deZG d d
d
eZdS ) )absolute_importN)uses_pycacheWINDOWScache_from_source)UninstallationError)rmtreeaskis_localrenamesnormalize_path)
indent_logc @ sZ e Zd ZdZdd Zdd Zdd Zdd Zd
d Zdd
Z dddZ
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)setpaths_refusepthdistsave_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 dkrtr| j t
| d S )N z.py)osr splitjoinr normcaseexistsr r addr splitextr r )r r headtailr r r r! # s
zUninstallPathSet.addc C sL t |}| j|r<|| jkr*t|| j|<