Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/distutils/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/distutils/__pycache__/lib2def.cpython-311.pyc

�

�܋f.����ddlZddlZddlZdZdZdeejdd���zZddgZdezZ	ej
d	ezej��Zej
d
ezej��Z
d�Zdddezgd
fd�Zd�Zejfd�Zedkr]e��\ZZe�ejZneed��Zeee��gzZeed���Zee��\ZZeeee	e��dSdS)�Na�This module generates a DEF file from the symbols in
an MSVC-compiled DLL import library.  It correctly discriminates between
data and functions.  The data is collected from the output of the program
nm(1).

Usage:
    python lib2def.py [libname.lib] [output.def]
or
    python lib2def.py [libname.lib] > output.def

libname.lib defaults to python<py_ver>.lib and output.def defaults to stdout

Author: Robert Kern <kernr@mail.ncifcrf.gov>
Last Update: April 30, 1999
z0.1az%d%d��nmz-CszrLIBRARY         python%s.dll
;CODE           PRELOAD MOVEABLE DISCARDABLE
;DATA           PRELOAD SINGLE

EXPORTS
z^(.*) in python%s\.dllz^_imp__(.*) in python%s\.dllc��ttj��dkr�tjddd�dkr7tjddd�dkrtjdd�\}}�n
tjddd�dkr6tjddd�dkrtjdd�\}}n�td��td	��n�ttj��dkrntjddd�dkrtjd}d
tz}n?tjddd�dkrd}tjd}nd
tz}d}||fS)zBParses the command-line arguments.

libfile, deffile = parse_cmd()�����Nz.librz.defz4I'm assuming that your first argument is the libraryzand the second is the DEF file.�python%s.lib)�len�sys�argv�print�py_ver)�libfile�deffiles  �j/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/distutils/lib2def.py�	parse_cmdr&sS���3�8�}�}�����8�A�;�r�s�s��v�%�%�#�(�1�+�b�c�c�*:�f�*D�*D�"�x����|��G�W�W�
�X�a�[����
��
'�
'�C�H�Q�K����,<��,F�,F�"�x����|��G�W�W��H�I�I�I��3�4�4�4�4�	�S�X���!�	�	��8�A�;�r�s�s��v�%�%��h�q�k�G�$�v�-�G�G�
�X�a�[����
��
'�
'��G��h�q�k�G�� �6�)�����G���r	Tc��tj||tjtjd���}|���\}}|jdkr)tdd�|���d|�d����|S)zUReturns the output of nm_cmd via a pipe.

nm_output = getnm(nm_cmd = 'nm -Cs py_lib')T)�shell�stdout�stderr�textrzfailed to run "� z": "�")�
subprocess�Popen�PIPE�communicate�
returncode�RuntimeError�join)�nm_cmdr�p�	nm_output�nm_errs     r�getnmr&>s���	���u�Z�_� *��d�	<�	<�	<�A��
�
����I�v��|�q����l�%(�X�X�f�%5�%5�%5�%5�v�v�v�?�@�@�	@��rc���t�|��}t�|��}g}|D]E}||vr?|dd�dks|dd�dks|dd�dkr|�|���Fg}|D]7}||vr1|dd�dks|dd�dkr|�|���8|���|���||fS)z�Returns a tuple of lists: dlist for the list of data
symbols and flist for the list of function symbols.

dlist, flist = parse_nm(nm_output)Nr�Pyr�_Py��init)�DATA_RE�findall�FUNC_RE�append�sort)r$�data�func�flist�sym�dlists      r�parse_nmr6Js��
�?�?�9�%�%�D��?�?�9�%�%�D��E������$�;�;�C����G�t�O�O�s�2�A�2�w�%�/?�/?�3�r��r�7�f�CT�CT��L�L�������E������e����R�a�R��D���C����G�u�4D�4D��L�L������	�J�J�L�L�L�	�J�J�L�L�L��%�<�rc�n�|D]
}|d|zz}�|dz}|D]
}|d|zz}�|�|��dS)zoOutputs the final DEF file to a file defaulting to stdout.

output_def(dlist, flist, header, file = sys.stdout)z		%s DATA
�
z	%s
N)�write)r5r3�header�file�data_sym�func_syms      r�
output_defr>`se���3�3���-�(�2�2���
�d�]�F��.�.���(�X�-�-����J�J�v�����r�__main__�wF)r)�rerr�__doc__�__version__�tuple�version_infor�
DEFAULT_NM�
DEF_HEADER�compile�	MULTILINEr.r,rr&r6rr>�__name__rr�open�strr"r$r5r3�rr�<module>rNs���	�	�	�	�
�
�
�
������� ��	�%�%��(��!��,�-�-�	-���E�]�
��

�
�
��"�*�.��7���
F�
F��
�"�*�4�v�=�r�|�
L�
L�����0��~��6�7�t�
�
�
�
����,-0�J�	�	�	�	��z��� �y�{�{��G�W����*����$�w��$�$��
�3�3�w�<�<�.�
(�F���f�E�*�*�*�I��8�I�&�&�L�E�5��J�u�e�Z��1�1�1�1�1��r

Hacked By AnonymousFox1.0, Coded By AnonymousFox