� ,�Re����dZddlZddlZddlZddlZddlZddlmZddl Z ddl Z gZ d�Z d�Z d�Zd�Zd�Zd �Zd �Zd �ZdS) z Monkey patching of distutils. �N)� import_modulec�n�tj��dkr |f|jzStj|��S)am Returns the bases classes for cls sorted by the MRO. Works around an issue on Jython where inspect.getmro will not return all base classes if multiple classes share the same name. Instead, this function will return a tuple containing the class itself, and the contents of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024. �Jython)�platform�python_implementation� __bases__�inspect�getmro)�clss ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/monkey.py�_get_mror s7���%�'�'�8�3�3��v�� �%�%� �>�#� � ��c��t|t��rtn#t|tj��rt nd�}||��S)Nc��dS)N�)�items r �zget_unpatched..(s��T�r)� isinstance�type�get_unpatched_class�types� FunctionType�get_unpatched_function)r�lookups r � get_unpatchedr$sP��)�$��5�5� ���",�T�5�3E�"F�"F� ����� � �6�$�<�<�rc��d�t|��D��}t|��}|j�d��sd|z}t |���|S)z�Protect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. c3�NK�|] }|j�d���|V��!dS)� setuptoolsN)� __module__� startswith)�.0r s r � z&get_unpatched_class..3sL������ ��~�(�(��6�6�� ������r� distutilsz(distutils has already been patched by %r)r �nextrr �AssertionError)r �external_bases�base�msgs r rr-sj�� ���C�=�=����N� �� � �D� �?� %� %�k� 2� 2�"�8�3�>���S�!�!�!� �Krc���tjtj_tjdk}|rtjtj_dtjcxkodkncpdtjcxkodknc}|rd}|tjj _ t��tj tjtj fD]}tj j|_�tjjtj_tjjtj_dtjvr&tjjtjd_t%��dS)N)��r*)r*�)r*r,�)r*r+zhttps://upload.pypi.org/legacy/zdistutils.command.build_ext)r�Commandr#�core�sys� version_info�findall�filelist�config� PyPIRCCommand�DEFAULT_REPOSITORY�_patch_distribution_metadata�dist�cmd� Distribution� extension� Extension�modules�#patch_for_msvc_specialized_compiler)�has_issue_12885�needs_warehouse� warehouse�modules r � patch_allrC?s7��'�/�I�N���&�)�3�O��8�%/�%7� ��"� ��!�-�-�-�-�I�-�-�-�-� /���!�.�.�.�.�Y�.�.�.�.�� �F�5� �.patch_params�sk��� � ��)�"2�"2�3�"7�"7�7� ��t�Y�'�'���H�%�%���s�I�&�&� )��i�(�(� (��S�)�#�#rzdistutils._msvccompiler� _get_vc_env�gen_lib_options)rr�system� functools�partialrUr_)rf�msvc14res @r r>r>�s���� �*� +� +�D�����I�%�%��� $� $� $� $� $�� �|�-F� G� G�F� ��F�F�=�)�)�*�*�*�� � � � � �� ���� ��F�F�,�-�-�.�.�.�.�� � � � � ��� ���s$�A� A%�$A%�)A=�= B � B )�__doc__r0�distutils.filelistr#rrrj� importlibrr r�__all__r rrrCr7rUrr>rrr �rqs����� � � � ��������� � � � �����#�#�#�#�#�#��������� ��� � � �������$"*�"*�"*�JD�D�D�0�0�0�"+�+�+�% �% �% �% �% r