관리-도구
편집 파일: direct_url_helpers.cpython-37.pyc
B ��Re � @ s� d dl Z d dlmZmZmZmZmZmZ d dlm Z d dl mZ yd dlm Z W n ek rh eZ Y nX e r�d dlmZ d dlmZ d dlmZ e �e�Zd d � Zddd �Zdd� ZdS )� N)�DIRECT_URL_METADATA_NAME�ArchiveInfo� DirectUrl�DirectUrlValidationError�DirInfo�VcsInfo)�MYPY_CHECK_RUNNING)�vcs)�JSONDecodeError)�Optional)�Link)�Distributionc C s� | � � |d }g }t| jt�r>|d�| jj| j| jj�7 }nTt| jt�rl|| j7 }| jj r�|� | jj � n&t| jt�s|t�| jj r�t�|| j7 }| jr�|� d| j � |r�|dd�|� 7 }|S )z0Convert a DirectUrl to a pip requirement string.z @ z{}+{}@{}z subdirectory=�#�&)�validate� isinstance�infor �formatr �url� commit_idr �hash�appendr �AssertionError�editable�subdirectory�join)� direct_url�name�requirement� fragments� r ��/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_reference s$ r"