UAddlZddlZddlZddlmZddlmZddlmZm Z ddl m Z m Z ddl mZmZejeZGddeZd ed ed efd ZdS) N)Values)Command)ERRORSUCCESS) FAVORITE_HASH STRONG_HASHES) read_chunks write_outputcBeZdZdZdZdZd dZdedee de fd Z dS) 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] ...TreturnNc |jdddtdtddt|jd|jdS) Nz-az --algorithm algorithmstorez$The hash algorithm to use: one of {}z, )destchoicesactiondefaulthelpr)cmd_opts add_optionrrformatjoinparserinsert_option_group)selfs m/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/commands/hash.py add_optionszHashCommand.add_optionssw    !!7>> -(( !  ''4=99999optionsargsc |s+|jtjtS|j}|D]"}t d||t||#tS)Nz%s: --hash=%s:%s) r print_usagesysstderrrrr _hash_of_filer)rr r!rpaths rrunzHashCommand.run'so  K # #CJ / / /L%   D #T9mD)6T6T    r)r N) __name__ __module__ __qualname____doc__usageignore_require_venvrrliststrintr(rrr r sl )E : : : : 6 c s      rr r'rr ct|d5}tj|}t|D]}|| dddn #1swxYwY|S)z!Return the hash digest of a file.rbN)openhashlibnewr update hexdigest)r'rarchivehashchunks rr&r&4s dD  W{9%% ))  E KK      >>  srEs 22222299999999CCCCCCCC>>>>>>>>  8 $ $#####'###Lr