| Current Path : /usr/lib/python2.7/site-packages/pip/_internal/models/ |
| Current File : //usr/lib/python2.7/site-packages/pip/_internal/models/target_python.pyc |
�
��Eac @ s� d d l Z d d l m Z m Z d d l m Z d d l m Z e rw d d l m Z m
Z
m Z d d l m
Z
n d e f d � � YZ d S( i����N( t
get_supportedt version_info_to_nodot( t normalize_version_info( t MYPY_CHECK_RUNNING( t Listt Optionalt Tuple( t Tagt TargetPythonc B sP e Z d Z d d d d d d d g Z d d d d d � Z d � Z d
� Z RS( sx
Encapsulates the properties of a Python interpreter one is targeting
for a package install, download, etc.
t _given_py_version_infot abist implementationt platformst
py_versiont py_version_infot _valid_tagsc C s� | | _ | d k r% t j d } n t | � } d j t t | d � � } | | _ | | _ | | _
| | _ | | _ d | _
d S( s<
: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.
i t .i N( R t Nonet syst version_infoR t joint mapt strR
R R R
R R ( t selfR R R
R R
( ( sF /usr/lib/python2.7/site-packages/pip/_internal/models/target_python.pyt __init__ s c C s~ d } | j d k r4 d j d � | j D� � } n d | j f d | f d | j f d | j f g } d j d � | D� � S(
sD
Format the given, non-None attributes for display.
R c s s | ] } t | � Vq d S( N( R ( t .0t part( ( sF /usr/lib/python2.7/site-packages/pip/_internal/models/target_python.pys <genexpr>O s R R R
R t c s s3 | ]) \ } } | d k r d j | | � Vq d S( s {}={!r}N( R t format( R t keyt value( ( sF /usr/lib/python2.7/site-packages/pip/_internal/models/target_python.pys <genexpr>Y s N( R R R R R
R ( R t display_versiont
key_values( ( sF /usr/lib/python2.7/site-packages/pip/_internal/models/target_python.pyt format_givenG s c C sv | j d k ro | j } | d k r- d } n t | � } t d | d | j d | j d | j � } | | _ n | j S( s�
Return the supported PEP 425 tags to check wheel candidates against.
The tags are returned in order of preference (most preferred first).
t versionR R
t implN( R R R R R R R
R ( R R R"