관리-도구
편집 파일: target_python.cpython-38.pyc
U ��.e� � @ sh d dl Z d dlmZmZ d dlmZ d dlmZ erTd dlm Z m Z mZ d dlmZ G dd� de �ZdS ) � N)� get_supported�version_info_to_nodot)�normalize_version_info)�MYPY_CHECK_RUNNING)�List�Optional�Tuple)� Pep425Tagc @ s* e Zd ZdZd dd�Zdd� Zdd� ZdS ) �TargetPythonzx Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. Nc C sf || _ |dkrtjdd� }nt|�}d�tt|dd� ��}|| _|| _|| _ || _ || _d| _dS )a :param platform: A string or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platform 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 abi: A string or None. This is passed to pep425tags.py's get_supported() function as is. :param implementation: A string or None. This is passed to pep425tags.py's get_supported() function as is. N� �.� ) �_given_py_version_info�sys�version_infor �join�map�str�abi�implementation�platform� py_version�py_version_info�_valid_tags)�selfr r r r r � r �F/usr/lib/python3.8/site-packages/pip/_internal/models/target_python.py�__init__ s zTargetPython.__init__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>C s z,TargetPython.format_given.<locals>.<genexpr>r r r r � c s s&