File "hash.cpython-36.pyc"
Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/python3.6/site-packages/pip/commands/__pycache__/hash.cpython-36.pyc
File size: 1.86 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit
3
Pf= @ s~ d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dl m
Z
d dlmZm
Z
ejeZG dd deZd d
ZdS ) )absolute_importN)Command)ERROR)read_chunks)
FAVORITE_HASH
STRONG_HASHESc s4 e Zd ZdZdZdZdZ fddZdd Z Z S ) HashCommandz
Compute a hash of a local package archive.
These can be used with --hash in a requirements file to do repeatable
installs.
hashz%prog [options] <file> ...z#Compute hashes of package archives.c
sJ t t| j|| | jjdddtdtddjt d | jj d| j d S ) Nz-az--algorithm algorithmZstorez$The hash algorithm to use: one of %sz, )destchoicesactiondefaulthelpr )
superr __init__Zcmd_optsZ
add_optionr r joinparserZinsert_option_group)selfargskw) __class__ /usr/lib/python3.6/hash.pyr s zHashCommand.__init__c C sD |s| j jtj tS |j}x"|D ]}tjd||t|| q"W d S )Nz%s:
--hash=%s:%s) r Zprint_usagesysstderrr r
loggerinfo
_hash_of_file)r Zoptionsr r
pathr r r run( s
zHashCommand.run)
__name__
__module____qualname____doc__nameZusageZsummaryr r
__classcell__r r )r r r s r c
C sD t | d,}tj|}xt|D ]}|j| q W W dQ R X |j S )z!Return the hash digest of a file.rbN)openhashlibnewr updateZ hexdigest)r r
archiver chunkr r r r 3 s
r )Z
__future__r r) Zloggingr Zpip.basecommandr Zpip.status_codesr Z pip.utilsr Zpip.utils.hashesr r Z getLoggerr! r r r r r r r <module> s
#