관리-도구
편집 파일: hash.cpython-36.pyc
3 �Re3 � @ s� d dl mZ d dlZd dlZd dlZd dlmZ d dlmZm Z d dl mZmZ d dl mZmZ d dlmZ er�d dlmZ d d lmZ eje�ZG d d� de�Zdd � ZdS )� )�absolute_importN)�Command)�ERROR�SUCCESS)� FAVORITE_HASH� STRONG_HASHES)�read_chunks�write_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] <file> ...Tc C s: | j jdddtdtdjdjt��d� | jjd| j � d S ) Nz-az--algorithm� algorithm�storez$The hash algorithm to use: one of {}z, )�dest�choices�action�default�helpr )�cmd_opts� add_optionr r �format�join�parser�insert_option_group)�self� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/hash.py�add_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_usage�sys�stderrr r r � _hash_of_filer )r �options�argsr �pathr r r �run+ s zHashCommand.runN)�__name__� __module__�__qualname__�__doc__�usage�ignore_require_venvr r&