HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pip/_internal/operations/__pycache__/freeze.cpython-310.pyc
o

@%Ne*&�@sBddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZmZddlmZmZddlmZmZddlmZdd	lmZe�e�ZGd
d�de	�Z 							
dde
ee!de"de"de
ee!de"de"dee!dee!fdd�Z#dede!fdd�Z$dede fdd�Z%Gdd�d�Z&dS) �N)�	Container�Dict�Iterable�Iterator�List�
NamedTuple�Optional�Set)�canonicalize_name)�Version)�
BadCommand�InstallationError)�BaseDistribution�get_environment)�install_req_from_editable�install_req_from_line)�
COMMENT_RE)�%direct_url_as_pep440_direct_referencec@s"eZdZUeed<eeed<dS)�
_EditableInfo�requirement�commentsN)�__name__�
__module__�__qualname__�str�__annotations__r�rr�A/usr/lib/python3/dist-packages/pip/_internal/operations/freeze.pyrs
rFrr�
local_only�	user_only�paths�isolated�exclude_editable�skip�returnccs^�i}t|�j|d|d�}|D]}	t�|	�}
|r|
jrq|
||
j<q|�rt�}t�t	�}|D]�}
t
|
���}|D]�}|��rJ|���d�sJ|�d�r[|�
�}||vrZ|�|�|Vq8|�d�se|�d�r�|�d�rs|dd���}n
|td�d����d�}t||d	�}ntt�d
|���|d	�}|js�t�d|
|���t�d�q8t|j�}||vr�||js�t�d
|
t�d
|���|j�q8||j�|
�q8t||��
�V||=||j�|
�q8Wd�n1s�wYq/|��D]\}}t|�dk�rt�d|d�tt|����q�dVt|��dd�d�D]}|j|v�r+t|��
�V�qdS)Nr)rr#r�#)z-rz
--requirementz-fz--find-linksz-iz--index-urlz--prez--trusted-hostz--process-dependency-linksz--extra-index-urlz
--use-featurez-ez
--editable��=)r!�zWSkipping line in requirement file [%s] because it's not clear what it would install: %sz9  (add #egg=PackageName to the URL to avoid this warning)zBRequirement file [%s] contains %s, but package %r is not installed�z+Requirement %s included multiple times [%s]z, z7## The following requirements were added by pip freeze:cSs
|j��S�N)�name�lower)�xrrr�<lambda>�s
zfreeze.<locals>.<lambda>)�key) r�iter_installed_distributions�FrozenRequirement�	from_dist�editable�canonical_name�set�collections�defaultdict�list�open�strip�
startswith�rstrip�add�len�lstriprrr�subr+�logger�infor
�warning�appendr�items�join�sorted�values)rrrr r!r"r#�
installations�dists�dist�req�emitted_options�	req_files�
req_file_path�req_file�line�line_req�line_req_canonical_namer+�files�installationrrr�freezes��	�



����

����

����K����rVrKcCs0t|jt�r|j�d|j��S|j�d|j��S)Nz==z===)�
isinstance�versionr�raw_name)rKrrr�_format_as_name_version�srZc
Cs�|j}|sJ�tj�tj�|��}ddlm}m}m}|�	|�}|dur:t
|�}t�d||�t
|d|�d�gd�St|�j}z	|�||j�}	Wnq|yct
|�}t
|d|�d	|�d�gd�YS|y�}
zt
|�}t
|d|�d
|�d�d|
j�d
�gd�WYd}
~
Sd}
~
wty�t�d||j�t
|gd�YSty�}zt�d|�WYd}~nd}~wwt
|	gd�St�d|�t
|dgd�S)za
    Compute and return values (req, comments) for use in
    FrozenRequirement.from_dist().
    r)�RemoteNotFoundError�RemoteNotValidError�vcsNz1No VCS found for editable requirement "%s" in: %rz,# Editable install with no version control (�))rrz# Editable z install with no remote (z
 install (z4) with either a deleted local remote or invalid URI:z# '�'zPcannot determine version of editable source in %s (%s command not found in path)z6Error when trying to get requirement for VCS system %sz-Could not determine repository location of %sz-## !! Could not determine repository location)�editable_project_location�os�path�normcase�abspath�pip._internal.vcsr[r\r]�get_backend_for_dirrZrA�debugr�typer�get_src_requirementrY�urlrrCr+r
)rKr`�locationr[r\r]�vcs_backend�display�vcs_namerL�ex�excrrr�_get_editable_info�sf
��

��������rqc@sVeZdZ	ddedededeeddf
dd	�Zed
eddfdd��Z	defd
d�Z
dS)r1rr+rLr3rr$NcCs&||_t|�|_||_||_||_dSr*)r+r
r4rLr3r)�selfr+rLr3rrrr�__init__�s


zFrozenRequirement.__init__rKcCsN|j}|rt|�\}}ng}|j}|rt||j�}nt|�}||j|||d�S)N)r)r3rq�
direct_urlrrYrZ)�clsrKr3rLrrtrrrr2�szFrozenRequirement.from_distcCs4|j}|jrd|��}d�t|j�t|�g�dS)Nz-e �
)rLr3rFr8rr)rrrLrrr�__str__�s
zFrozenRequirement.__str__)r)rrrr�boolrrs�classmethodrr2rwrrrrr1�s �����
�
r1)NFFNFFr)'r6�loggingra�typingrrrrrrrr	�pip._vendor.packaging.utilsr
�pip._vendor.packaging.versionr�pip._internal.exceptionsrr
�pip._internal.metadatarr�pip._internal.req.constructorsrr�pip._internal.req.req_filer�&pip._internal.utils.direct_url_helpersr�	getLoggerrrArrrxrVrZrqr1rrrr�<module>sP(
�
���
����
�yB