관리-도구
편집 파일: target_python.cpython-311.pyc
� �Re � �d � d dl Z d dlmZmZmZ d dlmZ d dlmZm Z d dl mZ G d� d� � ZdS )� N)�List�Optional�Tuple)�Tag)� get_supported�version_info_to_nodot)�normalize_version_infoc � � e Zd ZdZg d�Z d deee deee df deee dee d df d �Z d efd�Zd ee fd�Z dS )�TargetPythonzx Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. )�_given_py_version_info�abis�implementation� platforms� py_version�py_version_info�_valid_tagsNr r .r r �returnc � � || _ |�t j dd� }nt |� � }d� t t |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 �sys�version_infor �join�map�strr r r r r r )�selfr r r r r s ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/models/target_python.py�__init__zTargetPython.__init__ s� � �, '6��#��"�!�.�r��r�2�O�O�4�_�E�E�O��X�X�c�#��r��r�':�;�;�<�<� ��� �,���"���$���.��� 15����� c �� � d}| j �$d� d� | j D � � � � }d| j fd|fd| j fd| j fg}d� d � |D � � � � S ) zD Format the given, non-None attributes for display. Nr c 3 �4 K � | ]}t |� � V � �d S )N)r )�.0�parts r � <genexpr>z,TargetPython.format_given.<locals>.<genexpr>I s9 � � � � '� '�"��D� � �'� '� '� '� '� 'r r r r r � c 3 �. K � | ]\ }}|�|� d|��V � �d S )N�=� )r# �key�values r r% z,TargetPython.format_given.<locals>.<genexpr>S sB � � � � � �#-�3��u�?P�s���U���?P�?P�?P�?P� � r )r r r r r )r �display_version� key_valuess r �format_givenzTargetPython.format_givenC s� � � ���&�2�!�h�h� '� '�&*�&A�'� '� '� � �O� �$�.�)� �_�-� �T�Y�� �t�2�3� � � �x�x� � �1;� � � � � � r c � � | j �D| j }|�d}nt |� � }t || j | j | j �� � }|| _ | j S )z� Return the supported PEP 425 tags to check wheel candidates against. The tags are returned in order of preference (most preferred first). N)�versionr r �impl)r r r r r r r )r r r0 �tagss r �get_tagszTargetPython.get_tagsW sk � � ��#� #�9�O��&����/��@�@�� ���.��Y��(� � � �D� $�D����r )NNNN)�__name__� __module__�__qualname__�__doc__� __slots__r r r r �intr r. r r3 r) r r r r s� � � � � � �� � � � �I� *.�59�$(�(,�&5� &5��D��I�&�&5� "�%��S��/�2�&5� �t�C�y�!� &5� !�� �&5� � &5� &5� &5� &5�P �c� � � � �( �$�s�)� � � � � � r r ) r �typingr r r �pip._vendor.packaging.tagsr �&pip._internal.utils.compatibility_tagsr r �pip._internal.utils.miscr r r) r r �<module>r>