Re3 @ s d d l m Z d d l Z d d l Z d d l Z d d l m Z d d l m Z m Z d d l
m Z m Z d d l
m Z m Z d d l m Z e r d d l m Z d d l m Z e j e Z Gd
d d e Z d d
Z d S) )absolute_importN)Command)ERRORSUCCESS)
FAVORITE_HASH
STRONG_HASHES)read_chunkswrite_output)MYPY_CHECK_RUNNING)Values)Listc @ s: e Z d Z d Z d Z d Z d d Z d d Z d S) 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 j d d d d d t d d d t d d
j d j t | j j d | j d S)
Nz-az--algorithmdest algorithmchoicesactionstoredefaulthelpz$The hash algorithm to use: one of {}z, r )cmd_opts
add_optionr r formatjoinparserinsert_option_group)self r /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/hash.pyadd_options s zHashCommand.add_optionsc C sW | s | j j t j t S| j } x* | D]" } t d | | t | | q- Wt S)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&