� ��^i�����ddlZddlZddlZddlZddlmZddlmZddlm Z m Z m Z m Z ddl ZddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd l m!Z!ddl"m#Z#ddl$m%Z%ej&e'��Z(de)de ddfd�Z*d"d�Z+de e)e)ffd�Z,de)defd�Z-de)de e)fd�Z.de e)e)fddfd�Z/d"d�Z0deddfd�Z1dede)fd�Z2Gd �d!e��Z3dS)#�N)�Values)� ModuleType)�Any�Dict�List�Optional)�where)�parse)�__file__)� cmdoptions)�Command)�make_target_python)�SUCCESS)� Configuration)�get_environment)� indent_log)�get_pip_version�name�value�returnc�>�t�d||��dS)Nz%s: %s)�logger�info)rrs ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/commands/debug.py� show_valuers�� �K�K��$��&�&�&�&�&�c���t�d��tjj}t ��5t d|��ddd��dS#1swxYwYdS)Nzsys.implementation:r)rr�sys�implementationrrr)�implementation_names r�show_sys_implementationr!s��� �K�K�%�&�&�&��,�1�� ���0�0��6�.�/�/�/�0�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0�0�0s�A�A�Ac�D�tj�tj�t��dd��}t |��5}d�|���D��}ddd��n #1swxYwYtd�|D����S)N�_vendorz vendor.txtc�r�g|]4}d|v�|����dd��d��5S)�==� �r)�strip�split��.0�lines r� z)create_vendor_txt_map..-sA�� � � �.2�t�t�|�|�D�J�J�L�L� � �s�A� &� &�q� )�|�|�|rc3�BK�|]}|�dd��V��dS)r%r'N)r)r*s r� z(create_vendor_txt_map..2s0����6�6��� � �4��#�#�6�6�6�6�6�6r)�os�path�join�dirname� pip_location�open� readlines�dict)�vendor_txt_path�f�liness r�create_vendor_txt_mapr;%s����g�l�l� ���� �%�%�y�,���O� �o� � � �!� � �67�k�k�m�m� � � �� � � � � � � � � � � ���� � � � � �6�6��6�6�6� 6� 6�6s�A>�>B�B� module_namec���|���}|dkrd}td|��t��t��d���t t j|��S)N� setuptools� pkg_resourcesz pip._vendor.r)�level)�lower� __import__�globals�locals�getattr�pipr#)r<s r�get_module_from_module_namerG5s]���#�#�%�%�K��l�"�"�%� ��+�k�+�+�W�Y�Y�����J�J�J�J� �3�;� � ,� ,�,rc��t|��}t|dd��}|s]ttj�|j��g��}|�|��}|rt|j ��}|S)N� __version__) rGrErr0r1r3r �get_distribution�str�version)r<�modulerL�env�dists r�get_vendor_version_from_modulerP@sw�� (�� 5� 5�F��f�m�T�2�2�G� �(��r�w���v��?�?�@�A�A���#�#�K�0�0�� � (��$�,�'�'�G� �Nr�vendor_txt_versionsc��|���D]o\}}d}t|��}|sd}|}n5t|��t|��krd�|��}t�d|||���pdS)z{Log the actual version and print extra info if there is a conflict or if the actual version could not be imported. �zM (Unable to locate actual module version, using vendor.txt specified version)z5 (CONFLICT: vendor.txt suggests version should be {})z%s==%s%sN)�itemsrP� parse_version�formatrr)rQr<�expected_version� extra_message�actual_versions r�show_actual_vendor_versionsrZNs���*=�)B�)B�)D�)D�L�L�%� �%�� �7� �D�D��� �1� �.�N�N� �>� *� *�m�.�s+�������U�.I�%I�%I��%I�%I�%Ir�globalz, )�setrT�addr)�remover2)rn�levels�key�_�global_overriding_levelrvs @r�ca_bundle_infor�s���� �U�U�F��,�,�.�.�&�&���Q�� � �3�9�9�S�>�>�!�$�%�%�%�%� ����"B�"B�"B������!����� #���x��6���� � �h���� �9�9�V� � �rc�B�eZdZdZdZdZd d�Zdedee de fd �Z dS) � DebugCommandz$ Display debug information. z %prog TrNc��tj|j��|j�d|j��|jj���dS)Nr)r �add_target_python_options�cmd_opts�parser�insert_option_grouprn�load)�selfs r� add_optionszDebugCommand.add_options�sL���,�T�]�;�;�;� � �'�'��4�=�9�9�9� � ����!�!�!�!�!rr]�argsc��t�d��tdt����tdtj��tdtj��tdt j����tdt j����tdtj ����tdtj ��t��td t|jj����td t j�d ����td t j�d ����td t'����td t(jj��t/��t1|��t2S)Nz�This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.z pip versionz sys.versionzsys.executablezsys.getdefaultencodingzsys.getfilesystemencodingzlocale.getpreferredencodingz sys.platformz'cert' config value�REQUESTS_CA_BUNDLE�CURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)r�warningrrrrL� executable�getdefaultencoding�getfilesystemencoding�locale�getpreferredencoding�platformr!rr�rnr0�environ�getr rFr#� DEBUNDLEDr\rmr)r�r]r�s r�runzDebugCommand.run�sw����� %� � � � �=�/�"3�"3�4�4�4��=�#�+�.�.�.��#�S�^�4�4�4��+�S�-C�-E�-E�F�F�F��.��0I�0K�0K�L�L�L�� )� � '� )� )� � � � �>�3�<�0�0�0��!�!�!��(�.���9K�*L�*L�M�M�M��'�����8L�)M�)M�N�N�N��#�R�Z�^�^�4D�%E�%E�F�F�F��0�%�'�'�:�:�:��*�C�K�,A�B�B�B������'�����r�rN) �__name__� __module__� __qualname__�__doc__�usage�ignore_require_venvr�rrrK�intr�rurrr�r��sl�������� �E���"�"�"�"� �6���c���s������rr�r�)4r��loggingr0r�optparser�typesr�typingrrrr� pip._vendorrF�pip._vendor.certifir �pip._vendor.packaging.versionr rUr r4�pip._internal.clir �pip._internal.cli.base_commandr �pip._internal.cli.cmdoptionsr�pip._internal.cli.status_codesr�pip._internal.configurationr�pip._internal.metadatar�pip._internal.utils.loggingr�pip._internal.utils.miscr� getLoggerr�rrKrr!r;rGrPrZr\rmrr�rurr�r�s��� � � � ����� � � � � � � � �������������,�,�,�,�,�,�,�,�,�,�,�,�����%�%�%�%�%�%�@�@�@�@�@�@�(�(�(�(�(�(�(�(�(�(�(�(�2�2�2�2�2�2�;�;�;�;�;�;�2�2�2�2�2�2�5�5�5�5�5�5�2�2�2�2�2�2�2�2�2�2�2�2�4�4�4�4�4�4� �� �8� $� $��'�S�'��'��'�'�'�'�0�0�0�0� 7�t�C��H�~� 7� 7� 7� 7� -�S�-�Z�-�-�-�-� �� ��� � � � � �L�T�#�s�(�^�L��L�L�L�L�*9�9�9�9��v��$�����@�=��S�����(+�+�+�+�+�7�+�+�+�+�+r