관리-도구
편집 파일: req_install.cpython-311.pyc
� �ReJ� � �d � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZm Z m Z mZmZm Z mZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d lmZ d dl m!Z! d dl"m#Z#m$Z$ d d l%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z. d dl/m,Z0 d dl1m2Z3 d dl4m5Z5 d dl4m6Z7 d dl8m9Z9 d dl:m;Z;m<Z< d dl=m>Z> d dl?m@Z@ d dlAmBZBmCZC d dlDmEZE d dlFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZO d dlPmQZQ d dlRmSZS d dlTmUZUmVZV d dlWmXZX d d lYmZZZ ej[ e\� � Z]d!e^d"e!fd#�Z_ G d$� d%� � Z`d&e`d"e^fd'�ZadS )(� N)�Any� Collection�Dict�Iterable�List�Optional�Sequence�Union)� pkg_resources)�Marker)�Requirement)�SpecifierSet)�canonicalize_name)�Version)�parse)�Pep517HookCaller)�Distribution)�BuildEnvironment�NoOpBuildEnvironment)�InstallationError)� get_scheme)�Link)�generate_metadata)�generate_editable_metadata)�install_editable)�LegacyInstallFailure)�install)� install_wheel)�load_pyproject_toml�make_pyproject_path)�UninstallPathSet)� deprecated)�direct_url_for_editable�direct_url_from_link)�Hashes) �ask_path_exists� backup_dir�display_path�dist_in_install_path�dist_in_site_packages�dist_in_usersite�get_distribution�hide_url�redact_auth_from_url)�get_metadata)�runner_with_spinner_message)� TempDirectory� tempdir_kinds)�running_under_virtualenv)�vcs�metadata_directory�returnc � � | � t j � � }t j � |� � \ }}t j ||� � }|� d� � r2t j }t j � |� � d }na|� d� � sJ �t j }t j � |� � d � d� � d } ||||�� � S )zQReturn a pkg_resources.Distribution for the provided metadata directory. z .egg-infor z .dist-info�-)�project_name�metadata)�rstrip�os�sep�path�splitr �PathMetadata�endswithr �splitext�DistInfoDistribution)r5 �dist_dir�base_dir� dist_dir_namer: �dist_cls� dist_names ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/req/req_install.py� _get_distrJ B s� � � "�(�(���0�0�H� !�g�m�m�H�5�5��H�m��)�(�H�=�=�H� ����%�%� E� �-���G�$�$�]�3�3�A�6� � �� � ��.�.�.�.�.� �5���G�$�$�]�3�3�A�6�<�<�S�A�A�!�D� ��8����� � � � c �X � e Zd ZdZ dGdee deeed f dedee d ee d ee dedeee d eee deeeee f dede e dededdfd�Zdefd�Zdefd�Zdefd�Zedee fd�� � Z ej � � defd�� � Zedefd�� � Zedefd�� � ZdHdeee defd�Zedefd�� � ZdId edefd!�Zdee fd"�Zd#ed$ed%edefd&�Z dJd'�Z!dJd(�Z"d)eddfd*�Z#edefd+�� � Z$edefd,�� � Z%edefd-�� � Z&edefd.�� � Z'edefd/�� � Z(dJd0�Z)dJd1�Z*dJd2�Z+ede,fd3�� � Z-de.fd4�Z/dJd5�Z0 dKd6ed$ed%eddfd7�Z1dJd8�Z2 dKd9ed:edee3 fd;�Z4d<ed=ed>edefd?�Z5d#ee ddfd@�Z6 dLdee d ee7e dAee dBee dCee dDed)edEeddfdF�Z8dS )M�InstallRequirementz� Represents something that may be installed later on, may have information about where to fetch the relevant requirement and also contains logic for installing the said requirement. FN� �req� comes_from�editable�link�markers� use_pep517�isolated�install_options�global_options�hash_options� constraint�extras� user_supplied�permit_editable_wheelsr6 c �� � |�t |t � � s J |� � �|| _ || _ || _ || _ || _ d | _ d | _ | j rQ|sJ �|j rFt j � t j � |j � � � � | _ |�|r|j rt! |j � � }|x| _ | _ d| _ d | _ | j r| j j r| j j | _ |r|| _ n,|rd� |j D � � | _ nt- � � | _ |� |r|j }|| _ d | _ d| _ d | _ d | _ |r|ng | _ | r| ng | _ | r| ni | _ d| _ | | _! || _"