관리-도구
편집 파일: hash.cpython-37.pyc
B ��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 e�e�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 jdddtdtd�d�t��d� | j�d| 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-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/commands/hash.py�add_options s zHashCommand.add_optionsc C sB |s| j �tj� 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&