관리-도구
편집 파일: index.cpython-38.pyc
U &?�f{ � @ s� d dl Z d dlmZ d dlmZmZmZmZ d dlm Z d dl mZ d dlm Z d dlmZmZ d dlmZ d d lmZmZmZ d d lmZ d dlmZ d dlmZ d d lmZ d dlm Z d dl!m"Z" e �#e$�Z%G dd� de �Z&dS )� N)�Values)�Any�Iterable�List�Optional)�Version)� cmdoptions)�IndexGroupCommand)�ERROR�SUCCESS)�print_dist_installation_info)�CommandError�DistributionNotFound�PipError)� LinkCollector)� PackageFinder)�SelectionPreferences)�TargetPython)� PipSession)�write_outputc @ sr e Zd ZdZdZdZdd�dd�Zeee e d�d d �Zdeee e e e ed�dd �Zeee dd�dd�ZdS )�IndexCommandz= Inspect information available from package indexes. Tz& %prog versions <package> N)�returnc C s~ t �| j� | j�t �� � | j�t �� � | j�t �� � | j�t �� � t �t j | j �}| j �d|� | j �d| j� d S )Nr )r �add_target_python_options�cmd_opts� add_option�ignore_requires_python�pre� no_binary�only_binary�make_option_group�index_group�parser�insert_option_group)�self� index_opts� r% �J/opt/hc_python/lib/python3.8/site-packages/pip/_internal/commands/index.py�add_options s �zIndexCommand.add_options)�options�argsr c C s� d| j i}t�d� |r$|d |kr>t�dd�t|��� tS |d }z|| ||dd � � W n: tk r� } zt�|jd � t W Y �S d }~X Y nX t S )N�versionsztpip index is currently an experimental command. It may be removed/changed in a future release without prior warning.r zNeed an action (%s) to perform.�, � ) �get_available_package_versions�logger�warning�error�join�sortedr r r) r )r# r( r) �handlers�action�er% r% r&