1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
U
H=®dÂã@shddlZddlmZmZddlmZddlmZerTddlm    Z    m
Z
m Z ddl m Z Gdd„deƒZdS)    éN)Ú get_supportedÚversion_info_to_nodot)Únormalize_version_info)ÚMYPY_CHECK_RUNNING)ÚListÚOptionalÚTuple)ÚTagc@s<eZdZdZdddddddgZdd
d „Zd d „Zdd„Zd    S)Ú TargetPythonzx
    Encapsulates the properties of a Python interpreter one is targeting
    for a package install, download, etc.
    Ú_given_py_version_infoÚabiÚimplementationÚplatformÚ
py_versionÚpy_version_infoÚ _valid_tagsNcCsf||_|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 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 rrrr)Úselfrrr r r©rúYD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/models/target_python.pyÚ__init__!szTargetPython.__init__cCsZd}|jdk    r$d dd„|jDƒ¡}d|jfd|fd|jfd|jfg}d     d
d„|Dƒ¡S) zD
        Format the given, non-None attributes for display.
        Nrcss|]}t|ƒVqdS)N)r)Ú.0ÚpartrrrÚ    <genexpr>Qsz,TargetPython.format_given.<locals>.<genexpr>rrr r ú css&|]\}}|dk    rd ||¡VqdS)Nz{}={!r})Úformat)rÚkeyÚvaluerrrr [sÿ)r rrr r )rÚdisplay_versionÚ
key_valuesrrrÚ format_givenJs
 
ÿü
ÿzTargetPython.format_givencCsH|jdkrB|j}|dkrd}nt|ƒ}t||j|j|jd}||_|jS)z¤
        Return the supported PEP 425 tags to check wheel candidates against.
 
        The tags are returned in order of preference (most preferred first).
        N)Úversionrr Úimpl)rr rrrr r )rrr(ÚtagsrrrÚget_tags`s
üzTargetPython.get_tags)NNNN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú    __slots__rr'r+rrrrr
s ù û
)r
)rÚ&pip._internal.utils.compatibility_tagsrrÚpip._internal.utils.miscrÚpip._internal.utils.typingrÚtypingrrrÚpip._vendor.packaging.tagsr    Úobjectr
rrrrÚ<module>s