관리-도구
편집 파일: req_command.cpython-312.pyc
� G��e�G � �8 � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z mZmZm Z ddlmZ ddlmZ ddlmZ dd lmZ dd lmZmZ ddlmZ ddlmZ dd lmZ ddlm Z ddl!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5m6Z6m7Z7 ddl8m9Z9 e rddl:m;Z; ejx e=� Z>ded fd�Z? G d� de� Z@ G d� d ee@� ZAe7j� e7j� e7j� gZEd&d!�ZFd"e de fd#�ZG G d$� d%eA� ZHy)'a Contains the Command base classes that depend on PipSession. The classes in this module are in a separate module so the commands not needing download / PackageFinder capability don't unnecessarily import the PackageFinder machinery and all its vendored dependencies, etc. � N)�partial)�Values)� TYPE_CHECKING�Any�List�Optional�Tuple)� WheelCache)� cmdoptions)�Command)�CommandContextMixIn)�CommandError�PreviousBuildDirError)� LinkCollector)� PackageFinder)�SelectionPreferences)�TargetPython)� PipSession)�BuildTracker)�RequirementPreparer)�install_req_from_editable�install_req_from_line�#install_req_from_parsed_requirement�install_req_from_req_string)�parse_requirements)�InstallRequirement)�BaseResolver)�pip_self_version_check)� TempDirectory�TempDirectoryTypeRegistry� tempdir_kinds)�running_under_virtualenv)� SSLContext�returnr# c � � t j dk rt d� � dd l} ddlm} |j | j � S # t $ r t j d� Y y w xY w# t $ r}t d|� �� �d }~ww xY w)N)� � z9The truststore feature is only available for Python 3.10+r z1Disabling truststore since ssl support is missing)� truststorez'The truststore feature is unavailable: )�sys�version_infor �ssl�ImportError�logger�warning�pip._vendorr( r# �PROTOCOL_TLS_CLIENT)r+ r( �es ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/req_command.py�_create_truststore_ssl_contextr3 2 s� � � ���'�!��V�W�W��� J�*� � � ��!8�!8�9�9�� � ����J�K���� � J��D�Q�C�H�I�I��J�s( �A �A* �A'�&A'�* B�3B�Bc � � � e Zd ZdZd� fd�Zededeee fd�� Z dedefd�Z ddedee dee d edef d �Z� xZS ) �SessionCommandMixinzE A class mixin for command classes needing _build_session(). r$ c �0 �� t �| � � d | _ y �N)�super�__init__�_session)�self� __class__s �r2 r9 zSessionCommandMixin.__init__J s �� � ����.2�� � �optionsc � � g }t |dd� s t |dd� }|r|j |� t |dd� }|r|j |� |xs dS )z7Return a list of index urls from user-provided options.�no_indexF� index_urlN�extra_index_urls)�getattr�append�extend)�clsr>