3
”Re3 ã @ s® d dl mZ d dlZd dlZd dlZd dlmZ d dlmZm Z d dl
mZmZ d dl
mZmZ d dlmZ erˆd dlmZ d d lmZ ejeƒZG d
d„ deƒZdd
„ ZdS )é )Úabsolute_importN)ÚCommand)ÚERRORÚSUCCESS)Ú
FAVORITE_HASHÚ
STRONG_HASHES)Úread_chunksÚwrite_output)ÚMYPY_CHECK_RUNNING)ÚValues)ÚListc @ s( e Zd ZdZdZdZdd„ 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] ...Tc
C s: | j jdddtdtdjdjtƒƒd� | jjd| j ƒ d S ) 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)Úself© r úŠ/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/hash.pyÚadd_options s zHashCommand.add_optionsc C sB |s| j jtjƒ tS |j}x |D ]}td||t||ƒƒ q"W tS )Nz%s:
--hash=%s:%s) r Úprint_usageÚsysÚstderrr r r Ú
_hash_of_filer )r ÚoptionsÚargsr Úpathr r r Úrun+ s
zHashCommand.runN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚusageÚignore_require_venvr r&