File manager - Edit - /opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/req/__pycache__/constructors.cpython-311.pyc
Back
� ��]j�Y � � � d Z ddlmZ ddlZddlZddlZddlZddlmZm Z ddl mZ ddlm Z ddlmZ ddlmZmZ dd lmZmZ dd lmZ ddlmZ ddlmZmZ dd lmZ ddlm Z ddl!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5 g d�Z6 ej7 e8� � Z9dZ:ddd�Z;ded!�Z<dfd%�Z=dgd(�Z>dgd)�Z?dgd*�Z@dhd-�ZAdid.�ZB ed/�0� � G d1� d2� � � � ZCdjd3�ZD dkd4dd4d4d4dd5�dldB�ZEdmdD�ZFdndE�ZGdodG�ZH dkd4dd4dd4ddH�dpdJ�ZI dqdrdM�ZJ dsdtdP�ZKdudT�ZLdvdU�ZMdwdW�ZNdxd[�ZOdydc�ZPdS )za~ 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. � )�annotationsN)� Collection�Mapping)� dataclass)�pylock)�Marker)�InvalidRequirement�Requirement)�parse_sdist_filename�parse_wheel_filename)�InstallationError)� FormatControl)�PyPI�TestPyPI)�Link)�Wheel)�ParsedRequirement)�InstallRequirement)�is_archive_file)�is_installable_dir)�get_requirement)�package_archive_requirement_url�!package_directory_requirement_url�package_sdist_requirement_url�package_vcs_requirement_url�package_wheel_requirement_url)�path_to_url)�is_url�vcs)�install_req_from_editable�install_req_from_line�parse_editable)z~=�==z!=z<=z>=�<�>z===�path�str�return�tuple[str, str | None]c � � t j d| � � }d }|r=|� d� � � � � }|� d� � }n| }||fS )Nz^(.+)(\[[^\]]+\])$� � )�re�match�group�rstrip)r&