3 ”ReÂã@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|ƒ}djtt|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ú‘/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/target_python.pyÚ__init__!szTargetPython.__init__cCsZd}|jdk r$djdd„|jDƒƒ}d|jfd|fd|jfd|jfg}d jd d„|DƒƒS) zD Format the given, non-None attributes for display. Nrcss|]}t|ƒVqdS)N)r)Ú.0Úpartrrrú Rsz,TargetPython.format_given..rrr r ú css&|]\}}|dk rdj||ƒ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Ús