ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/__pycache__/monkey.cpython-311.pyc

�

�܋f����UdZddlmZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlZ
ed��ZgZded<	d	�Zdd�Zd
�Zd�Zd�Zd�Zd�Zd�ZdS)z
Monkey patching of distutils.
�)�annotationsN)�
import_module)�TypeVar�_Tz	list[str]�__all__c�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 �H/opt/cloudlinux/venv/lib64/python3.11/site-packages/setuptools/monkey.py�_get_mrors7���%�'�'�8�3�3��v��
�%�%��>�#�����item�returnc��t|t��rtn#t|tj��rt
nd�}||��S)Nc��dS�N�)rs r�<lambda>zget_unpatched.<locals>.<lambda>/s��$�r)�
isinstance�type�get_unpatched_class�types�FunctionType�get_unpatched_function)r�lookups  r�
get_unpatchedr!)sT���d�D�!�!�	����d�E�.�/�/��
#�
#�
�
���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)�.0rs  r�	<genexpr>z&get_unpatched_class.<locals>.<genexpr>:sK�������C�N�,E�,E�l�,S�,S��������r�	distutilsz(distutils has already been patched by %r)r�nextr%r&�AssertionError)r�external_bases�base�msgs    rrr4sj������}�}����N�����D��?�%�%�k�2�2�"�8�3�>���S�!�!�!��Krc��ddl}|jtj_t	��tjtjtjfD]}|jj|_�|jj	tj_	|jj	tj_	dtjvr!|jj	tjd_	t��dS)Nrzdistutils.command.build_ext)
r$�Commandr)�core�_patch_distribution_metadata�dist�cmd�Distribution�	extension�	Extension�sys�modules�#patch_for_msvc_specialized_compiler)r$�modules  r�	patch_allr<Ds�������(�/�I�N�� �"�"�"��.�)�.�)�-�?�;�;��(�o�:���� *�3�=�I�N��$.�$8�$B�I��!�$���3�3�!�*�4�	��)�	
�
�'�)�)�)�)�)rc�~�ddlm}	dD]2}t||��}ttjj||���3dS)N�)�_core_metadata)�write_pkg_info�write_pkg_file�
read_pkg_file�get_metadata_version�get_fullname)�r?�getattr�setattrr)r3�DistributionMetadata)r?�attr�new_vals   rr2r2[sa�� � � � � � �N��D�D���.�$�/�/���	��3�T�7�C�C�C�C�D�Drc��t||��}t|���d|��t|||��dS)z�
    Patch func_name in target_mod with replacement

    Important - original must be resolved by name to avoid
    patching an already patched function.
    �	unpatchedN)rF�vars�
setdefaultrG)�replacement�
target_mod�	func_name�originals    r�
patch_funcrSjsM���z�9�-�-�H�	���� � ��h�7�7�7��J�	�;�/�/�/�/�/rc��|jSr)rL)�	candidates rrr{s����rc����ddlm�tj��dkrdS�fd�}t	j|d��}	t
|d���dS#t$rYdSwxYw)z\
    Patch functions in distutils to use standalone Microsoft Visual C++
    compilers.
    r>)�msvc�WindowsNc���d}||�d��z}t�|��}t|��}t||��st	|���|||fS)zT
        Prepare the parameters for patch_func to patch indicated function.
        �msvc14_�_)�lstriprFr�hasattr�ImportError)�mod_namerQ�repl_prefix�	repl_name�repl�modrWs      �r�patch_paramsz9patch_for_msvc_specialized_compiler.<locals>.patch_params�sk��� ���)�"2�"2�3�"7�"7�7�	��t�Y�'�'���H�%�%���s�I�&�&�	)��i�(�(�(��S�)�#�#rzdistutils._msvccompiler�_get_vc_env)rErWr
�system�	functools�partialrSr^)rd�msvc14rWs  @rr:r:s����
����������I�%�%���
$�
$�
$�
$�
$��
�|�-F�
G�
G�F�
��F�F�=�)�)�*�*�*�*���
�
�
����
���s�A�
A�A)rrrr)�__doc__�
__future__rrgr
r
r8r�	importlibr�typingr�distutils.filelistr)rr�__annotations__rr!rr<r2rSrr:rrr�<module>rps7�����#�"�"�"�"�"�������������
�
�
�
�����#�#�#�#�#�#�����������
�W�T�]�]����������������
�
�
� *�*�*�.D�D�D�0�0�0�"���
�
�
�
�
r

Zerion Mini Shell 1.0