관리-도구
편집 파일: misc.cpython-38.pyc
U ʗReqT � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlm Z d dlmZmZmZ d dlmZ d dlmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z# d dl$m%Z% d dl&m'Z'm(Z(m)Z) d dl*m+Z+ d d l,m-Z- d d l.m/Z/ d dl0m1Z1 d dl2m3Z3 d dddddddddddddgZ4e�5e6�Z7e"d�Z8e e!e9 e9ef Z:e e;e;e;f Z<e e=e ee= ee= f f Z>e=d�dd�Z?e e;df e e;e;e;f d �d!d"�Z@e=dd#�d$d�ZAe=d�d%d�ZBe'd&e(d'�e)d(�d)�d�e=eCdd+�d,d ��ZDedef e=e:dd-�d.d/�ZEe=e=d#�d0d�ZFd�e=e=e=d2�d3d�ZGe=ee= e=d4�d5d6�ZHe=dd7�d8d9�ZIe=ee= e=d4�d:d�ZJe=e=d7�d;d<�ZKe=e=d7�d=d>�ZLe=e;d?�d@dA�ZMeNe=dB�dCd�ZOeee e ee= ee; f dD�dEdF�ZPe=eCd#�dGd�ZQejRfee;eeSddf dH�dIdJ�ZTd�e=eCe=dK�dLd�ZUe=e e=e=f d#�dMd�ZVe=e=ddN�dOd�ZWe=eCd#�dPdQ�ZXeeddR�dSdT�ZYG dUdV� dVe �ZZe j[e=eeZddf dW�dXdY��Z\eeZ d�dZd�Z]eeZ d�d[d\�Z^eee!e d]�d^d_�Z_e=ee; e=d`�dadb�Z`d�e=e=e=dd�dedf�Zae=e e=ee; f dg�dhdi�Zbe=e>dg�djdk�Zce=e=dg�dldm�Zde=ee=ge edf f e e=e>f dn�dodp�Zee=e>dg�dqdr�Zfe=e e= dg�dsdt�Zge=e e=e=e e=e=f f du�dvdw�Zhe=e=du�dxd�Zie=e=du�dydz�ZjG d{d|� d|�Zke=ekd}�d~d�Zle=ekdu�d�d��ZmeCdd��d�d��ZneCd�d�d��Zod�e=e;e ee;f d��d�d��ZpeCd�d�d��Zqee ee eef d��d�d��Zree8geCf ee8 e ee8 ee8 f d��d�d��ZsG d�d� de%�ZtdS )�� N)�StringIO)�filterfalse�tee�zip_longest)� TracebackType)�Any�BinaryIO�Callable�ContextManager�Dict� Generator�Iterable�Iterator�List�Optional�TextIO�Tuple�Type�TypeVar�cast)�Pep517HookCaller)�retry�stop_after_delay� wait_fixed)�__version__)�CommandError)�get_major_minor_version)�WINDOWS)�running_under_virtualenv�rmtree�display_path� backup_dir�ask�splitext�format_size�is_installable_dir�normalize_path�renames�get_prog�captured_stdout� ensure_dir�remove_auth_from_url�ConfiguredPep517HookCaller�T��returnc C s4 t j�t j�t�dd�} t j�| �} d�t| t� �S )Nz..zpip {} from {} (python {})) �os�path�join�dirname�__file__�abspath�formatr r )�pip_pkg_dir� r8 ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/misc.py�get_pip_versionH s �r: .)�py_version_infor/ c C sD t | �dk r"| dt | � d 7 } nt | �dkr:| dd� } td| �S )ax Convert a tuple of ints representing a Python version to one of length three. :param py_version_info: a tuple of ints representing a Python version, or None to specify no version. The tuple can have any length. :return: a tuple of length three if `py_version_info` is non-None. Otherwise, return `py_version_info` unchanged (i.e. None). � )r N�VersionInfo)�lenr )r; r8 r8 r9 �normalize_version_infoS s r? )r1 r/ c C sP zt �| � W n< tk rJ } z|jtjkr:|jtjkr:� W 5 d}~X Y nX dS )z os.path.makedirs without EEXIST.N)r0 �makedirs�OSError�errno�EEXIST� ENOTEMPTY)r1 �er8 r8 r9 r* f s c C sR z2t j�tjd �} | dkr*tj� d�W S | W S W n tttfk rL Y nX dS )Nr )z__main__.pyz-cz -m pip�pip) r0 r1 �basename�sys�argv� executable�AttributeError� TypeError� IndexError)�progr8 r8 r9 r( p s Tr<