ó •abc@@s¬ddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z m Z ejeƒZdefd„ƒYZd „ZdS( i(tabsolute_importN(tCommand(tERROR(t read_chunks(t FAVORITE_HASHt STRONG_HASHESt HashCommandcB@s2eZdZdZdZdZd„Zd„ZRS(sŽ Compute a hash of a local package archive. These can be used with --hash in a requirements file to do repeatable installs. thashs%prog [options] ...s#Compute hashes of package archives.cO@sqtt|ƒj||Ž|jjdddddtdddtd d d jtƒƒ|jj d |jƒdS( Ns-as --algorithmtdestt algorithmtchoicestactiontstoretdefaultthelps$The hash algorithm to use: one of %ss, i( tsuperRt__init__tcmd_optst add_optionRRtjointparsertinsert_option_group(tselftargstkw((s5/usr/lib/python2.7/site-packages/pip/commands/hash.pyRs  cC@sZ|s|jjtjƒtS|j}x-|D]%}tjd||t||ƒƒq-WdS(Ns%s: --hash=%s:%s( Rt print_usagetsyststderrRR tloggertinfot _hash_of_file(RtoptionsRR tpath((s5/usr/lib/python2.7/site-packages/pip/commands/hash.pytrun(s   (t__name__t __module__t__doc__tnametusagetsummaryRR!(((s5/usr/lib/python2.7/site-packages/pip/commands/hash.pyRs  cC@sUt|dƒ:}tj|ƒ}x!t|ƒD]}|j|ƒq.WWdQX|jƒS(s!Return the hash digest of a file.trbN(topenthashlibtnewRtupdatet hexdigest(R R tarchiveRtchunk((s5/usr/lib/python2.7/site-packages/pip/commands/hash.pyR3s (t __future__RR*tloggingRtpip.basecommandRtpip.status_codesRt pip.utilsRtpip.utils.hashesRRt getLoggerR"RRR(((s5/usr/lib/python2.7/site-packages/pip/commands/hash.pyts   #