관리-도구
편집 파일: filesystem.cpython-39.pyc
a ��Re � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dl m Z d dlmZm Z mZmZmZmZ d dlmZmZmZ d dlmZ d dlmZ eed�d d �Zeedd�dd �Zeed�dd�Zeeeee d�dd��Zeded�ed�d�Z e ej!�Z!eed�dd�Z"eed�dd�Z#eeee d�dd�Z$eee%e&f d�dd�Z'eed�d d!�Z(eee%e&f d�d"d#�Z)eed�d$d%�Z*dS )&� N)�contextmanager)�NamedTemporaryFile)�Any�BinaryIO�Iterator�List�Union�cast)�retry�stop_after_delay� wait_fixed)�get_path_uid)�format_size)�path�returnc C s� t jdksttd�sdS tj�| �s(J �d }| |kr�tj�| �r�t�� dkrvzt| �}W n t yl Y dS 0 |dkS t� | tj�S q,| tj�| � }} q,dS )N�win32�geteuidTr F) �sys�platform�hasattr�osr �isabs�lexistsr r �OSError�access�W_OK�dirname)r �previous�path_uid� r ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/utils/filesystem.py�check_path_owner s r! )�src�destr c C sn zt �| |� W nX tyh | |fD ]:}zt|�}W n tyH Y q&0 |r&t �d|� d���q&� Y n0 dS )z�Wrap shutil.copy2() but map errors copying socket files to SpecialFileError as expected. See also https://bugs.python.org/issue37700. �`z ` is a socketN)�shutil�copy2r � is_socket�SpecialFileError)r"