a
lj @ sV d dl Z d dlmZmZmZ d dlmZ d dlmZm Z d dl
mZ G dd dZdS ) N)ListOptionalTuple)Tag)
get_supportedversion_info_to_nodot)normalize_version_infoc @ sp e Zd ZdZg dZd
eee eee df eee ee ddddZ
edd d
Zee dddZ
dS )TargetPythonzx
Encapsulates the properties of a Python interpreter one is targeting
for a package install, download, etc.
)_given_py_version_infoabisimplementation platforms
py_versionpy_version_info_valid_tagsN.)r
r r r returnc C sf || _ |du rtjdd }nt|}dtt|dd }|| _|| _|| _ || _
|| _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
sysversion_infor joinmapstrr r r
r r r )selfr
r r r r r F/usr/lib/python3.9/site-packages/pip/_internal/models/target_python.py__init__ s zTargetPython.__init__)r c C sZ d}| j dur$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