o
    Ê©ZhO	  ã                   @   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.xUse the Meson backend instead, or generate wrapperswithout -c and use a custom build scripté   )Ú
stacklevel)ÚwarningsÚwarnr   ÚsuperÚ__init__)ZsefÚargsÚkwargs©Ú	__class__© úV/var/www/html/lang_env/lib/python3.10/site-packages/numpy/f2py/_backends/_distutils.pyr      s   ûzDistutilsBackend.__init__c              
   C   sF  i }|r| j  | dg ¡¡ | j| j| j | j| j| j| j| j	| j
dœ	}| jrD| jD ]}t|ƒ}|s;tdt|ƒ› 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rrtj dg| j ¡ | jrtj dg| j ¡ t|gd | jrŸt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   ÚprintÚreprr   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   r1   Ú__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    