o
    ðT·j„  ã                   @   sL   d Z ddlZddlmZ e dej¡jZe dej¡jZ	G dd„ deƒZdS )zŒdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.

Overridden to support f2py.

é    N)Ú	Extensionz.*\.(cpp|cxx|cc)\Zz!.*\.(f90|f95|f77|for|ftn|f|pyf)\Zc                   @   sP   e Zd ZdZ																			d	dd„Zdd„ Zdd„ ZdS )
r   a  
    Parameters
    ----------
    name : str
        Extension name.
    sources : list of str
        List of source file locations relative to the top directory of
        the package.
    extra_compile_args : list of str
        Extra command line arguments to pass to the compiler.
    extra_f77_compile_args : list of str
        Extra command line arguments to pass to the fortran77 compiler.
    extra_f90_compile_args : list of str
        Extra command line arguments to pass to the fortran90 compiler.
    Nc                 C   s¸   t j| |g |||||||	|
||d� || _|pg | _t| jtƒr4dd l}d}|j|tdd� | j 	¡ | _|p7g | _
|| _|p?g | _|pDg | _|pIg | _|pNg | _|pSg | _|pXg | _d S )N)
Úinclude_dirsÚdefine_macrosÚundef_macrosÚlibrary_dirsÚ	librariesÚruntime_library_dirsÚextra_objectsÚextra_compile_argsÚextra_link_argsÚexport_symbolsr   z4swig_opts is specified as a string instead of a listé   )Ú
stacklevel)Úold_ExtensionÚ__init__ÚsourcesÚ	swig_optsÚ
isinstanceÚstrÚwarningsÚwarnÚSyntaxWarningÚsplitÚdependsÚlanguageÚf2py_optionsÚmodule_dirsÚextra_c_compile_argsÚextra_cxx_compile_argsÚextra_f77_compile_argsÚextra_f90_compile_args)ÚselfÚnamer   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r    r   Úmsg© r$   ú\/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/numpy/distutils/extension.pyr   !   s:   õ







zExtension.__init__c                 C   ó   t dd„ | jD ƒƒS )Nc                 s   s   � | ]	}t t|ƒƒV  qd S ©N)Ú
cxx_ext_rer   ©Ú.0Úsourcer$   r$   r%   Ú	<genexpr>`   s   € z,Extension.has_cxx_sources.<locals>.<genexpr>©Úanyr   ©r!   r$   r$   r%   Úhas_cxx_sources_   ó   zExtension.has_cxx_sourcesc                 C   r&   )Nc                 s   s   � | ]}t |ƒV  qd S r'   )Úfortran_pyf_ext_rer)   r$   r$   r%   r,   c   s   € z-Extension.has_f2py_sources.<locals>.<genexpr>r-   r/   r$   r$   r%   Úhas_f2py_sourcesb   r1   zExtension.has_f2py_sources)NNNNNNNNNNNNNNNNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r0   r3   r$   r$   r$   r%   r      s0    
ì>r   )
r7   ÚreÚdistutils.extensionr   r   ÚcompileÚIÚmatchr(   r2   r$   r$   r$   r%   Ú<module>   s    