B
    us^                 @   sz   d Z ddlmZmZmZ ddlZddlZddlmZ	 ej
d dkrFeZedejjZedejjZG dd	 d	e	ZdS )
zdistutils.extension

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

Overridden to support f2py.

    )divisionabsolute_importprint_functionN)	Extension   z.*[.](cpp|cxx|cc)\Zz".*[.](f90|f95|f77|for|ftn|f|pyf)\Zc               @   s*   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 || _|p0g | _t| jtrhdd l}d}|j|tdd | j	 | _|png | _
|| _|p~g | _|pg | _|pg | _|pg | _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
basestringwarningswarnSyntaxWarningsplitdependslanguagef2py_optionsmodule_dirs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   msg r&   e/home/fristb/BIRCH/lib-linux-x86_64/python/lib64/python3.7/site-packages/numpy/distutils/extension.pyr   '   s4    





zExtension.__init__c             C   s$   x| j D ]}tt|rdS qW dS )NTF)r   
cxx_ext_restr)r#   sourcer&   r&   r'   has_cxx_sourcesa   s    zExtension.has_cxx_sourcesc             C   s    x| j D ]}t|rdS qW dS )NTF)r   fortran_pyf_ext_re)r#   r*   r&   r&   r'   has_f2py_sourcesg   s    zExtension.has_f2py_sources)NNNNNNNNNNNNNNNNN)__name__
__module____qualname____doc__r   r+   r-   r&   r&   r&   r'   r      s(                   
(r   )r1   
__future__r   r   r   sysredistutils.extensionr   r   version_infor)   r   compileImatchr(   r,   r&   r&   r&   r'   <module>   s   