Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc

�

4Μg����ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
mZddlmZmZej$e�ZGd�d	e�Zd
ededefd
�Zy)�N)�Values)�List)�Command)�ERROR�SUCCESS)�
FAVORITE_HASH�
STRONG_HASHES)�read_chunks�write_outputc�:�eZdZdZdZdZd
d�Zdedee	de
fd	�Zy)�HashCommandz�
    Compute a hash of a local package archive.

    These can be used with --hash in a requirements file to do repeatable
    installs.
    z%prog [options] <file> ...T�returnNc
���|jjdddtdtdj	djt����|jjd|j�y)	Nz-az--algorithm�	algorithm�storez$The hash algorithm to use: one of {}z, )�dest�choices�action�default�helpr)�cmd_opts�
add_optionr	r�format�join�parser�insert_option_group)�selfs �F/usr/local/lib/python3.12/site-packages/pip/_internal/commands/hash.py�add_optionszHashCommand.add_optionss_���
�
� � ����!��!�7�>�>��	�	�-�(��	!�
	
�	
���'�'��4�=�=�9��options�argsc
���|s/|jjtj�tS|j
}|D]}t
d||t||���tS)Nz%s:
--hash=%s:%s)	r�print_usage�sys�stderrrrr�
_hash_of_filer)rr!r"r�paths     r�runzHashCommand.run(sT����K�K�#�#�C�J�J�/��L��%�%�	��D��#�T�9�m�D�)�6T�
���r )rN)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvrrr�str�intr)�r rr
r
s7���
)�E���:�
�6�
��c��
�s�
r r
r(rrc���t|d�5}tj|�}t|�D]}|j	|��	ddd�|j�S#1swYj�SxYw)z!Return the hash digest of a file.�rbN)�open�hashlib�newr
�update�	hexdigest)r(r�archive�hash�chunks     rr'r'5s`��	
�d�D�	�W��{�{�9�%�� ��)�E��K�K���*�
��>�>���	
��>�>���s�7A�A5)r6�loggingr%�optparser�typingr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.utils.hashesrr	�pip._internal.utils.miscr
r�	getLoggerr*�loggerr
r0r'r2r r�<module>rFsY����
���2�9�C�>�	��	�	�8�	$��#�'�#�L������r 

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists