o
    ZZŽhP	  ã                   @   st   d dl mZ ddlmZmZ ddlmZ ddlmZ ddl	m
Z
 ddlZddlZddlZddlZG dd	„ d	eƒZdS )
é   )ÚBackendé    )ÚsetupÚ	Extension)Úget_info)Údict_append)ÚVisibleDeprecationWarningNc                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )ÚDistutilsBackendc                    s&   t jdtdd tƒ j|i |¤Ž d S )NzŽ
distutils has been deprecated since NumPy 1.26.x
Use the Meson backend instead, or generate wrappers without -c and use a custom build scripté   )Ú
stacklevel)ÚwarningsÚwarnr   ÚsuperÚ__init__)ZsefÚargsÚkwargs©Ú	__class__© úN/var/www/auris/lib/python3.10/site-packages/numpy/f2py/_backends/_distutils.pyr      s   ûzDistutilsBackend.__init__c              
   C   sB  i }|r| j  | dg ¡¡ | j| j| j | j| j| j| j| j	| j
dœ	}| jrB| jD ]}t|ƒ}|s9td|›dƒ t|fi |¤Ž q)tdi |¤Ž}tjd g| j t_tj dd| jd| jd	d
dg¡ | jrptj dg| j ¡ | jr}tj dg| j ¡ t|gd | jrtj | j¡rŸtd| j› ƒ t | j¡ d S d S d S )NÚinclude_dirs)	ÚnameÚsourcesr   Úlibrary_dirsÚ	librariesÚdefine_macrosÚundef_macrosÚextra_objectsZf2py_optionszNo z2 resources foundin system (try `f2py --help-link`)r   Úbuildz--build-tempz--build-basez--build-platlibÚ.z--disable-optimizationZ	config_fcZ	build_ext)Zext_moduleszRemoving build directory r   )r   ÚextendÚgetÚ
modulenamer   r   r   r   r   r   Z
f2py_flagsZsysinfo_flagsr   Úprintr   r   ÚsysÚargvZsetup_flagsÚ	build_dirZfc_flagsZ
flib_flagsr   Zremove_build_dirÚosÚpathÚexistsÚshutilÚrmtree)ÚselfZnum_infoZext_argsÚnÚiÚextr   r   r   Úcompile   sV   ÷

ÿøÿþzDistutilsBackend.compile)Ú__name__Ú
__module__Ú__qualname__r   r0   Ú__classcell__r   r   r   r   r	      s    
r	   )Z_backendr   Znumpy.distutils.corer   r   Znumpy.distutils.system_infor   Znumpy.distutils.misc_utilr   Znumpy.exceptionsr   r'   r$   r*   r   r	   r   r   r   r   Ú<module>   s    