o
    6a                     @   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	 zd dl
Z
W n ey3   dZ
Y nw ejjdkr<dZ
z#ejddZedde d dlZW d   n1 sYw   Y  W n eyj   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 ed
Zeeek rdZ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   T)recordalways )version)LooseVersionz0.29.21zrequires cython)reasonc                 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..random	_examplescythonzsetup.pybuildinstallz--prefix
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   numpy.randomr   uniforms_exshapedtypenpfloat64)tmp_pathsrcdir	build_dirfidtxt_to_findilineso1so2r   r   values r6   C/usr/lib/python3/dist-packages/numpy/random/tests/test_extending.pytest_cython,   sR   		
r8   zrequires numba and cffic                  C      ddl m}  d S Nr   r   )numpy.random._examples.numbar   r;   r6   r6   r7   
test_numbaX   s   r=   zrequires cffic                  C   r9   r:   )numpy.random._examples.cffir   r;   r6   r6   r7   	test_cffi]   s   r?   ) r   pytestr   r   r   warningsnumpyr*   numpy.distutils.misc_utilr   cffiImportErrorflagsoptimizecatch_warningswfilterwarningsDeprecationWarningnumbar   Cython.Compiler.Versionr   cython_versiondistutils.versionr   required_versionmarkskipifslowr8   r=   r?   r6   r6   r6   r7   <module>   sV    
*
