관리-도구
편집 파일: target_python.cpython-38.pyc
U &?�f� � @ sZ d dl Z d dlmZmZmZmZ d dlmZ d dlm Z m Z d dlmZ G dd� d�Z dS )� N)�List�Optional�Set�Tuple)�Tag)� get_supported�version_info_to_nodot)�normalize_version_infoc @ s� e Zd ZdZdddddddd gZdeee eee df eee ee d d�d d�Z ed�dd�Zee d�dd�Z ee d�dd�Zd S )�TargetPythonzx Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. �_given_py_version_info�abis�implementation� platforms� py_version�py_version_info�_valid_tags�_valid_tags_setN.)r r r r �returnc C sl || _ |dkrtjdd� }nt|�}d�tt|dd� ��}|| _|| _|| _ || _ || _d| _d| _ dS )a< :param platforms: A list of strings or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platforms passed in. These packages will only be downloaded for distribution: they will not be built locally. :param py_version_info: An optional tuple of ints representing the Python version information to use (e.g. `sys.version_info[:3]`). This can have length 1, 2, or 3 when provided. :param abis: A list of strings or None. This is passed to compatibility_tags.py's get_supported() function as is. :param implementation: A string or None. This is passed to compatibility_tags.py's get_supported() function as is. N� �.� )r �sys�version_infor �join�map�strr r r r r r r )�selfr r r r r � r �P/opt/hc_python/lib/python3.8/site-packages/pip/_internal/models/target_python.py�__init__ s zTargetPython.__init__)r c C sZ d}| j dk r$d�dd� | j D ��}d| jfd|fd| jfd| jfg}d �d d� |D ��S )zD Format the given, non-None attributes for display. Nr c s s | ]}t |�V qd S )N)r )�.0�partr r r � <genexpr>J s z,TargetPython.format_given.<locals>.<genexpr>r r r r � c s s( | ] \}}|d k r|� d|��V qd S )N�=r )r �key�valuer r r r"