a
    ˜¥»a1  ã                   @   sZ   d dl Z d dlZdd„ Zdd„ Zddd„Zed	krVd d
lmZ ef i 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ÚRuntimeErrorr   © r	   úJ/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/scipy/_lib/setup.pyÚcheck_boost_submodule   s    r   c                 C   s<   ddl m} || jƒ}| dg ¡ |d u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   )ÚConfigurationr   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ƒ�0}|D ]\}}| 	d 
||¡¡ qNW d   ƒ n1 s~0    Y  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   sX    
ýýÿ
ýþþ
ûr0   Ú__main__)Úsetup)r/   )r   N)	r   Úpathlibr   r   r0   Ú__name__Znumpy.distutils.corer2   Ztodictr	   r	   r	   r
   Ú<module>   s   
@