3
Re3 @ s d dl mZ d dlZd dlZd dlZd dlmZ d dlmZm Z d dl
mZmZ d dl
mZmZ d dlmZ erd dlmZ d d lmZ ejeZG d
d deZdd
ZdS ) )absolute_importN)Command)ERRORSUCCESS)
FAVORITE_HASH
STRONG_HASHES)read_chunkswrite_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 jdddtdtdjdjtd | jjd| j d S ) Nz-az--algorithm algorithmstorez$The hash algorithm to use: one of {}z, )destchoicesactiondefaulthelpr )cmd_opts
add_optionr r formatjoinparserinsert_option_group)self r /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/hash.pyadd_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_usagesysstderrr r r
_hash_of_filer )r optionsargsr pathr r r run+ s
zHashCommand.runN)__name__
__module____qualname____doc__usageignore_require_venvr r&