HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python3.9/site-packages/pip/_internal/commands/__pycache__/hash.cpython-39.pyc
a

?�f3�@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZddl
mZmZddlmZer�ddlmZdd	lmZe�e�ZGd
d�de�Zdd
�ZdS)�)�absolute_importN)�Command)�ERROR�SUCCESS)�
FAVORITE_HASH�
STRONG_HASHES)�read_chunks�write_output)�MYPY_CHECK_RUNNING)�Values)�Listc@s(eZdZdZdZdZdd�Zdd�ZdS)	�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> ...TcCs:|jjdddtdtd�d�t��d�|j�d|j�dS)	Nz-az--algorithm�	algorithmZstorez$The hash algorithm to use: one of {}z, )�dest�choices�action�default�helpr)Zcmd_optsZ
add_optionrr�format�join�parserZinsert_option_group)�self�r�?/usr/lib/python3.9/site-packages/pip/_internal/commands/hash.py�add_optionss��zHashCommand.add_optionscCs>|s|j�tj�tS|j}|D]}td||t||��q tS)Nz%s:
--hash=%s:%s)	rZprint_usage�sys�stderrrrr	�
_hash_of_filer)r�options�argsr�pathrrr�run+s�zHashCommand.runN)�__name__�
__module__�__qualname__�__doc__ZusageZignore_require_venvrr!rrrrr
s
r
cCsTt|d��2}t�|�}t|�D]}|�|�qWd�n1sB0Y|��S)z!Return the hash digest of a file.�rbN)�open�hashlib�newr�update�	hexdigest)r r�archive�hash�chunkrrrr8s

*r)Z
__future__rr(ZloggingrZpip._internal.cli.base_commandrZpip._internal.cli.status_codesrrZpip._internal.utils.hashesrrZpip._internal.utils.miscrr	Zpip._internal.utils.typingr
Zoptparser�typingrZ	getLoggerr"Zloggerr
rrrrr�<module>s
$