📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-27 08:08:50
📂
/
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pip
/
_internal
/
req
/
__pycache__
✏️
Editing: constructors.cpython-312.pyc
� Jr*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 ejn e8� Z9dZ:d5d�Z;d6d�Z<d7d�Z=d8d�Z>d8d�Z?d8d�Z@d9d�ZAd:d �ZB ed!�"� G d#� d$� � ZCd;d%�ZD d<d&dd&d&d&dd'� d=d(�ZEd>d)�ZFd?d*�ZGd@d+�ZH d<d&dd&dd&dd,� dAd-�ZI dB dCd.�ZJ dD dEd/�ZK dFd0�ZLdGd1�ZM dHd2�ZNdId3�ZO dJd4�ZPy)Ka~ 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===c � � t j d| � }d }|r4|j d� j � }|j d� }||fS | }||fS )Nz^(.+)(\[[^\]]+\])$� � )�re�match�group�rstrip)�path�m�extras�path_no_extrass �M/opt/hc_python/lib/python3.12/site-packages/pip/_internal/req/constructors.py� _strip_extrasr2 : s] � � ���&��-�A� �F�������*�*�,�������� �6�!�!� ���6�!�!� c �f � | s t � S t d| j � z � j S )N�placeholder)�setr �lowerr/ )r/ s r1 �convert_extrasr8 F s( � ���u���=�6�<�<�>�9�:�A�A�Ar3 c �X � t j dt | � t j �� }|�J d| � d�� �|j d� }|j d� }|�|�J d| � d�� �dj |rd j t |� � 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 .-]+)(\[[^\]]*\])?(.*))�flagszregex match on requirement z! failed, this should never happenr'