o
    d\                  	   @   s  d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	 d dl
mZ zd dlZW n ey9   dZY nw ejjdkrBdZz#ejddZedde d dlZW d   n1 s_w   Y  W n eefyr   dZY nw zd dlZd d	lmZ W n ey   dZY nw d d
lmZ dZeeeek rdZejj eddejj edu ddejj!dd Z"ejj edu pedu dddd Z#ejj edu dddd Z$dS )    N)exec_mod_from_location)IS_WASM   T)recordalways )version)_pep440z0.29.30zCan't start subprocess)reasonzrequires cythonc                 C   s  t jt jtd}t|| d  | d d d }tjt	j
ddddt| d	 d
dt| d g	t|d t|d  }d}t|D ]
\}}||v rM nqCJ d|W d    n1 s_w   Y  d  }}t| d }|D ]}d|v r{| }d|v r| }qqW d    n1 sw   Y  |d usJ |d usJ td| td|}	ddlm}
 |	|
ddd}|jdksJ |jtjksJ d S )Nz..randomZ	_examplescythonzsetup.pybuildinstallz--prefixZ
installdirz#--single-version-externally-managedz--recordztmp_install_log.txt)cwdzextending.cz0NumPy API declarations from "numpy/__init__.pxd"Fz-Could not find '{}' in C file, wrong pxd usedz
extending.extending_distributions	extendingr   )PCG64
   d)r   )ospathjoindirname__file__shutilcopytree
subprocess
check_callsys
executablestropen	enumerateformatstripr   Znumpy.randomr   Zuniforms_exshapeZdtypenpZfloat64)Ztmp_pathsrcdir	build_dirfidZtxt_to_findilineZso1Zso2r   r   values r-   U/app/.heroku/python/lib/python3.10/site-packages/numpy/random/tests/test_extending.pytest_cython/   sR   		
r/   zrequires numba and cffic                  C      ddl m}  d S Nr   r   )Znumpy.random._examples.numbar   r2   r-   r-   r.   
test_numba\   s   r3   zrequires cffic                  C   r0   r1   )Znumpy.random._examples.cffir   r2   r-   r-   r.   	test_cffia   s   r4   )%r   Zpytestr   r   r   warningsnumpyr&   Znumpy.distutils.misc_utilr   Znumpy.testingr   ZcffiImportErrorflagsoptimizecatch_warningswfilterwarningsDeprecationWarningZnumbaSystemErrorr   ZCython.Compiler.Versionr   Zcython_versionZnumpy.compatr	   Zrequired_versionparseVersionmarkZskipifZslowr/   r3   r4   r-   r-   r-   r.   <module>   sZ    
*
