o
    tBh                     @   sV   d dl Z dd Zdd ZdddZed	kr)d d
lmZ edi edd  dS dS )    Nc                 C   s   ddl m}m}m} | j}||}|d ur$d|vrg |d< |d | ddgdgg ddgd	d
gdgdgd}|D ]}||d| dd}	|	rX|| D ]}
|d |
df qLq:||ddryz
|d d W d S  tyx   dg|d< Y d S w d S )Nr   )get_c_std_flagtry_compilehas_flagextra_compiler_argsHAVE_DECL_GETOPTHAVE_UNISTD_HHAVE_DLFCN_H)HAVE_GETTIMEOFDAYHAVE_SYS_TIME_HTIME_WITH_SYS_TIMEHAVE_MEMORY_HHAVE_STRCASECMPHAVE_STRINGS_HHAVE_SYS_STAT_HHAVE_SYS_TYPES_H)zunistd.hzdlfcn.hz
sys/time.hzmemory.hz	strings.hz
sys/stat.hzsys/types.hz
#include <z#>
int main(int argc, char **argv){})codemacros1z-lm)flag	librariesm)"scipy._build_utils.compiler_helperr   r   r   compilerappendKeyError)
build_clib
build_infor   r   r   cc_flagdepsdephas_depmacro r#   p/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/scipy/stats/_unuran/setup.pyunuran_pre_build_hook   s8   r%   c                    sJ   g }| D ] dd t  D } fdd|D }|dd |D 7 }q|S )Nc                 S   s   g | ]
}t j|s|qS r#   )ospathisdir.0filer#   r#   r$   
<listcomp>%   s
    z _get_sources.<locals>.<listcomp>c                    s   g | ]}t  | qS r#   )strr)   dir_r#   r$   r,   (       c                 S   s   g | ]	}| d r|qS )z.c)endswith)r*   sourcer#   r#   r$   r,   )   s    )r&   listdir)dirssourcesfilesr'   r#   r.   r$   _get_sources"   s   r7    c                    s  ddl m} ddlm} tj|ddd std|d| |}|dd  d	}g d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)| fd*d+d,d-| fd.d/d0d-| fd1d2}tj	d3d4tj	d3d4d5tj	d3d4d6tj	d3d4d7tj	d3d4d8tj	d3d4d9tj	d3d4d:tj	d3d4d;tj	d3d4d<g	} fd=d>|D }t
|d?d  }	|jd@dAg|	 g dBd> |D tj	tjtdCdCdDd4g tjtg dE|dF}
t|
_|dG |dH |S )INr   )Configuration)_unuran_dirT)ret_pathz	README.mdzNMissing the `unuran` submodule! Run `git submodule update --init` to fix this._unuranz16:0:0)
HAVE_ALARMr   )HAVE_DECL_ALARMr   )HAVE_DECL_HUGE_VALr   )HAVE_DECL_INFINITYr   )HAVE_DECL_ISFINITE0)HAVE_DECL_ISINFrB   )HAVE_DECL_ISNANr   )HAVE_DECL_LOG1Pr   )HAVE_DECL_SIGNALr   )HAVE_DECL_SNPRINTFr   )HAVE_DECL_VSNPRINTFr   )HAVE_FLOAT_Hr   )
HAVE_FLOORr   )HAVE_IEEE_COMPARISONSr   )HAVE_INTTYPES_Hr   )	HAVE_LIBMr   )HAVE_LIMITS_Hr   )HAVE_POWr   )HAVE_SIGNALr   )	HAVE_SQRTr   )HAVE_STDINT_Hr   )HAVE_STDLIB_Hr   )HAVE_STRCHRr   )HAVE_STRING_Hr   )HAVE_STRTOLr   )HAVE_STRTOULr   )	LT_OBJDIRz".libs/")PACKAGE"unuran")PACKAGE_BUGREPORTz"unuran@statmath.wu.ac.at")PACKAGE_NAMErZ   PACKAGE_STRINGz"unuran %s")PACKAGE_TARNAMErZ   )PACKAGE_URLz""PACKAGE_VERSIONz"%s")STDC_HEADERSr   )UNUR_ENABLE_INFOr   VERSION)HAVE_CONFIG_Hr   )_ISOC99_SOURCEr   unuransrcdistrdistributionsmethodsparser	specfuncturngutilstestsc                    s   g | ]} | qS r#   r#   r*   r/   
UNURAN_DIRr#   r$   r,   p   s    z!configuration.<locals>.<listcomp>   unuran_wrapperzunuran_wrapper.cc                 S   s   g | ]}t | qS r#   )r-   resolverp   r#   r#   r$   r,   x   r0   z.._libr   )r5   r   include_dirslanguagedefine_macrosz*.pxdz*.pyi)numpy.distutils.misc_utilr9   scipy._lib._unuran_utilsr:   r&   r'   existsRuntimeErrorru   joinr7   add_extensiondirname__file__r%   pre_build_hookadd_data_files)parent_packagetop_pathr9   r:   configUNURAN_VERSIONDEFINE_MACROSUNURAN_DIRSUNURAN_SOURCE_DIRSr5   extr#   rq   r$   configuration-   s   	

 !
"#$
%&'+

r   __main__)setup)r   )r8   Nr#   )r&   r%   r7   r   __name__numpy.distutils.corer   todictr#   r#   r#   r$   <module>   s    
]