관리-도구
편집 파일: direct_url_helpers.cpython-311.pyc
� �Re� � � � d dl mZ d dlmZmZmZmZ d dlmZ d dl m Z d dlmZ dede de fd �Zd e defd�Z dded ee dedefd�ZdS )� )�Optional)�ArchiveInfo� DirectUrl�DirInfo�VcsInfo)�Link)�path_to_url)�vcs� direct_url�name�returnc �F � | � � � |dz }g }t | j t � � r4|d� | j j | j | j j � � z }nvt | j t � � r6|| j z }| j j r|� | j j � � n&t | j t � � sJ �|| j z }| j r|� d| j z � � |r|dd� |� � 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-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_referencer s% � ���������,�K��I��*�/�7�+�+� &��z�(�(��O������1J� � � ��� �J�O�[� 1� 1� &��z�~�%���?�� 3����Z�_�1�2�2�2���*�/�7�3�3�3�3�3��z�~�%���� D�����:�+B�B�C�C�C�� 1��s�S�X�X�i�0�0�0�0���� � source_dirc �Z � t t | � � t d�� � �� � S )NT)�editable)r r )r r r )r s r �direct_url_for_editabler# s2 � ��� �#�#� �d� #� #� #�� � � r NF�link�link_is_in_wheel_cachec � � | j r�t j | j � � }|sJ �|� | j � � \ }}}|r|sJ �|}n|sJ �|� |� � }t |t |j ||�� � | j �� � S | � � � 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'