관리-도구
편집 파일: misc.cpython-312.pyc
� G��e�\ � �D � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlZ d dlmZ d dlmZ d dlmZmZmZ d dlmZ d dlmZmZ d dlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* d dl+m,Z, d d l-m.Z. d d l/m0Z0m1Z1m2Z2 d dl3m4Z4 d dl5m6Z6m7Z7 d d l8m9Z9 d dl:m;Z; d dl<m=Z= g d�Z> ej~ e@� ZA e(d� ZBe&e'eC eCef ZDe&eEeEeEf ZFe&eGe&e$eG e$eG f f ZHeeeeCgef ZIeeeeDgef ZJdeGfd�ZKde&eEdf de&eEeEeEf fd�ZLdeGddfd�ZMdeGfd�ZN e0d e1d� e2d� �� dtdeGdeOd e$eI ddfd!�� ZPd"eddfd#�ZQd"eddfd$�ZReRd%�d&eded'e)eDeCf d eIddf d(�ZSdeGdeGfd)�ZTdudeGd*eGdeGfd+�ZUd,eGd-e!eG deGfd.�ZVd,eGddfd/�ZWd,eGd-e!eG deGfd0�ZXd,eGdeGfd1�ZYd,eGdeGfd2�ZZd3eGdeEfd4�Z[d5e\deGfd6�Z]d7e!e!e de&e#eG e#eE f fd8�Z^deGdeOfd9�Z_ej� fd:ed;eEde eaddf fd<�ZbdvdeGd=eOdeGfd>�ZcdeGde&eGeGf fd?�Zdd@eGdAeGddfdB�ZedeGdeOfdC�ZfdDedEeddfdF�Zg G dG� dHe� Zhe j� dIeGde ehddf fdJ�� Zjdeeh fdK�Zkdeeh fdL�ZldMedNede'e fdO�ZmdPeGdQe$eE deGfdR�ZndwdSeGdTeGdeGfdU�ZodSeGde&e$eG e$eE f fdV�ZpdSeGdeHfdW�ZqdSeGdeGfdX�ZrdYeGdZeeGge&edf f de&eGeHf fd[�ZsdSeGdeHfd\�ZtdSeGde&eG fd]�ZudYeGde&eGeGe&e$eG e$eG f f fd^�ZvdYeGdeGfd_�ZwdYeGdeGfd`�Zxdae,deGfdb�Zy G dc� dd� ZzdeeGdezfdf�Z{dYeGdezfdg�Z|dheOddfdi�Z}dxdj�Z~deOfdk�ZdydeGdleEde&eeEf fdm�Z�dne!e de"e&eef fdo�Z�dpeeBgeOf dne!eB de&e!eB e!eB f fdq�Z� G dr� dse.� Z�y)z� N)�partial)�StringIO)�filterfalse�tee�zip_longest)�Path)�FunctionType� TracebackType)�Any�BinaryIO�Callable�ContextManager�Dict� Generator�Iterable�Iterator�List�Optional�TextIO�Tuple�Type�TypeVar�Union�cast)�Requirement)�BuildBackendHookCaller)�retry�stop_after_delay� wait_fixed)�__version__)�CommandError�ExternallyManagedEnvironment)�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�check_externally_managed� ConfiguredBuildBackendHookCaller�T�returnc � � t j j t j j t � dd� } t j j | � } dj t | t � � S )Nz..zpip {} from {} (python {})) �os�path�join�dirname�__file__�abspath�formatr r# )�pip_pkg_dirs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/misc.py�get_pip_versionrA L sV � ��'�'�,�,�r�w�w���x�8�$��E�K��'�'�/�/�+�.�K�'�.�.����!�� � �py_version_info.c � � t | � dk r| dt | � z dz z } nt | � dkD r| dd } t d| � 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 )rC s r@ �normalize_version_inforH W sP � � �?��a���A��O� 4�4��<�<�� �_� �� !�)�"�1�-��� ��/�/rB r9 c �� � t j | � y# t $ rJ}|j t j k7 r#|j t j k7 r� Y d}~yY d}~yd}~ww xY w)z os.path.makedirs without EEXIST.N)r8 �makedirs�OSError�errno�EEXIST� ENOTEMPTY)r9 �es r@ r1 r1 j sN � �� ���D���� ��7�7�e�l�l�"�q�w�w�%�/�/�'A�� (B�"���s � � A+�;A&�&A+c �� � t j j t j d � } | dv rt j � d�S | S # t t t f$ r Y yw xY w)Nr )z__main__.pyz-cz -m pip�pip) r8 r9 �basename�sys�argv� executable�AttributeError� TypeError� IndexError)�progs r@ r/ r/ t s_ � � ��w�w��������,���(�(��n�n�%�W�-�-��K���I�z�2� ��� �s �AA � A �A"�!A"TrE g �?)�reraise�stop�wait�dir� ignore_errors�onexcc � � |rt }|�t }t t t t t f t � |�� }t j dk\ rt j | |�� y t j | |�� y )N�r_ )rE � )�onerror)�_onerror_ignore�_onerror_reraiser r r �OnExc�OnErr�rmtree_errorhandlerrS �version_info�shutilr&