관리-도구
편집 파일: misc.cpython-36.pyc
3 �Re�n � @ s, d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlZd dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZmZ d d lmZmZmZmZmZ d d l m!Z" d dl#m$Z% d dl&m'Z' d d l(m)Z) d dl*m+Z+m,Z,m-Z-m.Z. d dl/m0Z0m1Z1m2Z2m3Z3 d dl4m5Z5m6Z6 d dl7m8Z8m9Z9 e�r`d dlm:Z; nd dlm;Z; e5�r�d dl<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZH d dlImJZJ eFeKeKeKf ZLeGd�ZMdddddddddd d!d"d#d$gZNejOeP�ZQd%d&� ZRd'd(� ZSd)d"� ZTd*d � ZUed+d,d-�d�d/d��ZVd0d1� ZWd2d3� ZXd4d� ZYd�d6d�ZZd7d8� Z[d9d:� Z\d;d� Z]d<d=� Z^d>d?� Z_d@d� Z`dAdB� ZadCd� ZbejcfdDdE�Zdd�dGd�ZedHd� ZfdId� ZgdJdK� ZhdLdM� ZidNdO� ZjdPdQ� ZkdRdS� ZldTdU� ZmdFe2dFd.d.dfdVdW�ZndXdY� ZodZd[� Zpd\d]� Zqd^d_� Zrd`da� ZsG dbdc� dcet�ZuG ddde� dee;�Zvejwdfdg� �Zxdhd!� Zydidj� Zzd�dkd#�Z{dldm� Z|dndo� Z}dpdq� Z~d�dsdt�Zdudv� Z�dwdx� Z�dydz� Z�d{d|� Z�d}d~� Z�dd�� Z�d�d�� Z�d�d$� Z�d�d�� Z�G d�d�� d�et�Z�d�d�� Z�d�d�� Z�d�d�� Z�d�d�� Z�d�d�d��Z�d�d�� Z�d�d�� Z�d�d�� Z�dS )�� )�absolute_importN)�deque)�tee)� pkg_resources)�canonicalize_name)�retry)�PY2� text_type)�filter�filterfalse�input�map�zip_longest)�parse)�unquote)�__version__)�CommandError)�distutils_scheme�get_major_minor_version� site_packages� user_site)�WINDOWS� expanduser�stdlib_pkgs�str_to_display)�MYPY_CHECK_RUNNING�cast)�running_under_virtualenv�virtualenv_no_global)�BytesIO)�StringIO)�Any�AnyStr�Callable� Container�Iterable�Iterator�List�Optional�Text�Tuple�TypeVar�Union)�Distribution�T�rmtree�display_path� backup_dir�ask�splitext�format_size�is_installable_dir�normalize_path�renames�get_prog�captured_stdout� ensure_dir�get_installed_version�remove_auth_from_urlc C s4 t jjt jjt�dd�} t jj| �} djt| t� �S )Nz..zpip {} from {} (python {})) �os�path�join�dirname�__file__�abspath�formatr r )�pip_pkg_dir� rE ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/misc.py�get_pip_versionO s rG 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)r )�lenr )�py_version_inforE rE rF �normalize_version_info[ s rL c C sP yt j| � W n< tk rJ } z |jtjkr:|jtjkr:� W Y dd}~X nX dS )z os.path.makedirs without EEXIST.N)r= �makedirs�OSError�errno�EEXIST� ENOTEMPTY)r>