관리-도구
편집 파일: direct_url_helpers.cpython-312.pyc
� G��e� � � � d dl mZ d dlmZmZmZmZ d dlmZ d dl m Z d dlmZ dede de fd �Zd e defd�Z dd ed ee dedefd�Zy)� )�Optional)�ArchiveInfo� DirectUrl�DirInfo�VcsInfo)�Link)�path_to_url)�vcs� direct_url�name�returnc � � | j � |dz }g }t | j t � rI|dj | j j | j | j j � z }n�t | j t � rK|| j z }| j j rQ|j | j j � n+t | j t � sJ �|| j z }| j r|j d| j z � |r|ddj |� z z }|S )z0Convert a DirectUrl to a pip requirement string.z @ z{}+{}@{}z subdirectory=�#�&)�validate� isinstance�infor �formatr �url� commit_idr �hash�appendr �subdirectory�join)r r �requirement� fragmentss ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_referencer s � �������,�K��I��*�/�/�7�+��z�(�(��O�O���������1J�1J� � �� �J�O�O�[� 1��z�~�~�%���?�?������Z�_�_�1�1�2��*�/�/�7�3�3��z�~�~�%���������:�+B�+B�B�C���s�S�X�X�i�0�0�0���� � source_dirc �B � t t | � t d�� �� S )NT)�editable)r r )r r r )r s r �direct_url_for_editabler# s � ��� �#� �d� #�� r N�link�link_is_in_wheel_cachec �D � | j r�t j | j � }|sJ �|j | j � \ }}}|r|sJ �|}n|sJ �|j |� }t |t |j ||�� | j �� S | j � r*t | j t � | j �� S d }| j } | r| � d| j � �}t | j t |�� | j �� S )N)r r �requested_revision)r r r �=)r )�is_vcsr �get_backend_for_scheme�scheme�get_url_rev_and_auth�url_without_fragment�get_revisionr r r �subdirectory_fragment�is_existing_dirr � hash_namer r ) r$ r r% �vcs_backendr r'