Current File : //lib/python3.9/site-packages/pip/_internal/req/__pycache__/constructors.cpython-39.pyc |
a
[��f�; � @ s� d Z ddlZddlZddlZddlmZmZmZmZm Z m
Z
ddlmZ ddl
mZmZ ddlmZ ddlmZmZ ddlmZ dd lmZmZ dd
lmZ ddlmZ ddlmZ dd
l m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+m,Z, g d�Z-e�.e/�Z0ej1�2� Z3e4e e4ee4 f d�dd�Z5ee4 ee4 d�dd�Z6e4e ee4 e4ee4 f d�dd�Z7e4e4d�dd�Z8G d d!� d!�Z9e4e9d�d"d#�Z:d=e4ee
e!e4f ee; e;eee4ef e;e;e;e!d%� d&d'�Z<e4e;d(�d)d*�Z=e4e4ee4 d+�d,d-�Z>e4ee4 e9d.�d/d0�Z?d>e4ee
e4e!f ee; e;eee4ef e;ee4 e;e!d1� d2d3�Z@d?e4ee! e;ee; e;e!d4�d5d6�ZAd@ee;ee; e;e!d7�d8d9�ZBee!e!d:�d;d<�ZCdS )Aa~ 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)�Any�Dict�Optional�Set�Tuple�Union)�Marker)�InvalidRequirement�Requirement)� Specifier)�RequirementParseError�parse_requirements)�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 C s6 t �d| �}d }|r*|�d�}|�d�}n| }||fS )Nz^(.+)(\[[^\]]+\])$� � )�re�match�group)r �m�extrasZpath_no_extras� r'