관리-도구
편집 파일: direct_url_helpers.cpython-311.pyc
� �܋f| � � � 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 �, � | � � � |dz }g }t | j t � � r'|| j j � d| j � d| 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 subdirectory=�#�&) �validate� isinstance�infor r �url� commit_idr �hash�appendr �subdirectory�join)r r �requirement� fragmentss �]/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_referencer s% � ���������,�K��I��*�/�7�+�+� &����"�Q�Q�Z�^�Q�Q�j�o�6O�Q�Q� ��� �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&