B
    0d1                 @   sV   d dl Z d dlZdd Zdd ZdddZed	krRd d
lmZ ef edd  dS )    Nc              C   s.   ddl m}  tj| ddd s*tdd S )Nr   )
_boost_dirT)Zret_pathz	README.mdzMMissing the `boost` submodule! Run `git submodule update --init` to fix this.)scipy._lib._boost_utilsr   ospathexistsRuntimeError)r    r   B/var/www/html/venv/lib/python3.7/site-packages/scipy/_lib/setup.pycheck_boost_submodule   s    r
   c             C   s<   ddl m} || j}|dg  |d k	r8|d | d S )Nr   )get_cxx_std_flagZextra_compiler_args)Z"scipy._build_utils.compiler_helperr   compiler
setdefaultappend)cmdextr   Zstd_flagr   r   r	   build_clib_pre_build_hook   s
    
r    c                s$  ddl m} ddlm} t  |d| |  d tjtj	tj
td}tj	|dg} jdd	g||gd
  jddg||gd
  jddgd  fdd}tj	|dg} jddg|g ||gd
  jddg|gd  jddg|gd  d  jddg| dtd  S )Nr   )Configuration)r   Z_libz
tests/*.pysrczccallback.hZ_ccallback_cz_ccallback_c.c)sourcesdependsinclude_dirsZ_test_ccallbackzsrc/_test_ccallback.cZ_fpumodez
_fpumode.c)r   c          	      s|      }g }|jddddr&|d tjtjtdd}t|d*}x"|D ]\}}|	d
|| qPW W d Q R X d S )	NZopen_memstreamT)declcall)ZHAVE_OPEN_MEMSTREAM1r   zmessagestream_config.hwz#define {0} {1}
)Zget_config_cmdZ
check_funcr   r   r   joindirname__file__openwriteformat)r   	build_dirZ
config_cmdZdefinestargetfnamevalue)configr   r	   get_messagestream_config.   s    
z/configuration.<locals>.get_messagestream_configzmessagestream.hZmessagestreamzmessagestream.cZ_test_deprecation_callz_test_deprecation_call.c)r   r   Z_test_deprecation_defz_test_deprecation_def.cZ_uarrayZtest_boost_buildztests/test_boost_build.cppzc++)r   r   languageZ_pre_build_hook)Znumpy.distutils.misc_utilr   r   r   r
   Zadd_data_filesr   r   abspathr   r   r   add_extensionZadd_subpackageZadd_libraryr   )parent_packagetop_pathr   r   Zinclude_dirr   r(   r   )r'   r	   configuration   sJ    








r.   __main__)setup)r-   )r   N)	r   pathlibr
   r   r.   __name__Znumpy.distutils.corer0   Ztodictr   r   r   r	   <module>   s   
@