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_supportedversion_info_to_nodot)normalize_version_info)MYPY_CHECK_RUNNING)ListOptionalTuple) Pep425Tagc @ s* e Zd ZdZd ddZdd Zdd ZdS )
TargetPythonzx
Encapsulates the properties of a Python interpreter one is targeting
for a package install, download, etc.
Nc C sf || _ |dkrtjdd }nt|}dtt|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_infosysversion_infor joinmapstrabiimplementationplatform
py_versionpy_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$ddd | 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 ).0partr r r