B
    €õža·  ã               @   sN   d dl Z d dlZd dlZddd„ZedkrJd dlmZ ef edd ¡ Ž dS )	é    NÚ c             C   sî   ddl m} ddlm} |d| |ƒ}| d¡ | d¡ | d¡ |jdd	gd
 dd„ }ddddddddddddddddg}dd„ |D ƒf}|jdd g|d!gtj 	d!d"¡tj 	d!d#¡tj 	d!d$¡tj 	d!d%¡tj 	d!d&¡|gd'}||_
|S )(Nr   )ÚConfiguration)Úset_cxx_flags_hookZsparseZtestsZlinalgZcsgraphZ_csparsetoolsz_csparsetools.c)Úsourcesc             S   s(   t  tjtj tj t¡d¡dg¡ g S )Nzgenerate_sparsetools.pyz
--no-force)	Ú
subprocessZ
check_callÚsysÚ
executableÚosÚpathÚjoinÚdirnameÚ__file__)ZextZ	build_dir© r   ú1lib/python3.7/site-packages/scipy/sparse/setup.pyÚget_sparsetools_sources   s
    z.configuration.<locals>.get_sparsetools_sourceszsparsetools_impl.hz
bsr_impl.hz
csc_impl.hz
csr_impl.hzother_impl.hz
bool_ops.hzbsr.hzcomplex_ops.hzcoo.hzcsc.hz	csgraph.hzcsr.hzdense.hzdia.hzsparsetools.hzutil.hc             S   s   g | ]}t j d |¡‘qS )Úsparsetools)r	   r
   r   )Ú.0Zhdrr   r   r   ú
<listcomp>,   s    z!configuration.<locals>.<listcomp>Z_sparsetools)Z__STDC_FORMAT_MACROSé   r   zsparsetools.cxxzcsr.cxxzcsc.cxxzbsr.cxxz	other.cxx)Zdefine_macrosÚdependsZinclude_dirsr   )Znumpy.distutils.misc_utilr   Z"scipy._build_utils.compiler_helperr   Zadd_data_dirZadd_subpackageÚadd_extensionr	   r
   r   Z_pre_build_hook)Úparent_packageÚtop_pathr   r   Zconfigr   r   r   r   r   r   Úconfiguration   sL    




r   Ú__main__)Úsetup)r   )r   N)r	   r   r   r   Ú__name__Znumpy.distutils.corer   Ztodictr   r   r   r   Ú<module>   s   
7