관리-도구
편집 파일: constructors.cpython-311.pyc
� �܋f�G � � � d Z ddlZddlZddlZddlZddlmZ ddlmZm Z m Z mZmZm Z mZ ddlmZ ddlmZmZ ddlmZ ddlmZ dd lmZmZ dd lmZ ddlmZ ddlm Z dd l!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z- g d�Z. ej/ e0� � Z1ej2 �3 � � Z4de5de e5ee5 f fd�Z6dee5 dee5 fd�Z7dedee5 defd�Z8de5de ee5 e5ee5 f fd�Z9de5ddfd�Z:de5de5fd �Z; ed!�"� � G d#� d$� � � � Z<de5de<fd%�Z= dBdd&ddd&d&d&dd'�de5d(eee"e5f d)ee> d*e>d+ee e5 d,ee e5e e5 f d-e>d.e>d/e>d0ee e5ee5e e5 f f de"fd1�Z?d2e5de>fd3�Z@de5d2e5dee5 fd4�ZAd2e5d5ee5 de<fd6�ZB dBdd&ddd&dd&dd7�d2e5d(eee5e"f d)ee> d*e>d+ee e5 d,ee e5e e5 f d-e>d5ee5 d.e>d0ee e5ee5e e5 f f de"fd8�ZC dCd9e5d(ee" d*e>d)ee> d.e>de"fd:�ZD dDd;e d*e>d)ee> d.e>d0ee e5ee5e e5 f f de"fd<�ZEd=ed>e"de"fd?�ZFd>e"de"fd@�ZGd>e"dee5 de"fdA�ZHdS )Ea~ Backing implementation for InstallRequirement's various constructors The idea here is that these formed a major chunk of InstallRequirement's size so, moving them and support code dedicated to them outside of that class helps creates for better understandability for the rest of the code. These are meant to be used elsewhere within pip to create instances of InstallRequirement. � N)� dataclass)� Collection�Dict�List�Optional�Set�Tuple�Union)�Marker)�InvalidRequirement�Requirement)� Specifier)�InstallationError)�PyPI�TestPyPI)�Link)�Wheel)�ParsedRequirement)�InstallRequirement)�is_archive_file)�is_installable_dir)�get_requirement)�path_to_url)�is_url�vcs)�install_req_from_editable�install_req_from_line�parse_editable�path�returnc � � t j d| � � }d }|r+|� d� � }|� d� � }n| }||fS )Nz^(.+)(\[[^\]]+\])$� � )�re�match�group)r �m�extras�path_no_extrass �U/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/req/constructors.py� _strip_extrasr+ , sQ � � ��&��-�-�A� �F�� �������������������6�!�!� r( c �t � | st � � S t d| � � � z � � j S )N�placeholder)�setr �lowerr( )r( s r* �convert_extrasr1 8 s1 � �� ��u�u���=�6�<�<�>�>�9�:�:�A�Ar, �req� new_extrasc �r � t j dt | � � t j �� � }|�J d| � d�� � �|� d� � }|� d� � }|�|�J d| � d�� � �|r%d d � t |� � � � z nd}t |� |� |� �� � S )z� Returns a new requirement based on the given one, with the supplied extras. If the given requirement already has extras those are replaced (or dropped if no new extras are given). z([\w\t .-]+)(\[[^\]]*\])?(.*))�flagsNzregex match on requirement z! failed, this should never happenr"