a
    p=ic                     @   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yf   dZ
Y n0 ejjdkrxdZ
zFejdd&Zedde d dlZW d   n1 s0    Y  W n ey   dZY n0 zd dlZd dlmZ W n ey   dZY n,0 d d	lmZ d
Zeeeek r2dZejjedu ddejjdd Zejjedu ple
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)_pep440z0.29.30z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}d}t|D ]\}}||v r qqdsJ d|W d    n1 s0    Y  d  }}t| d :}|D ]$}d|v r| }d|v r| }qW d    n1 s"0    Y  |d us:J |d usHJ 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npfloat64)Ztmp_pathsrcdir	build_dirZfidZtxt_to_findilineZso1Zso2r   r   values r,   r/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/numpy/random/tests/test_extending.pytest_cython,   sF    	
$*
r.   zrequires numba and cffic                  C   s   ddl m}  d S Nr   r   )Znumpy.random._examples.numbar   r0   r,   r,   r-   
test_numbaX   s    r1   zrequires cffic                  C   s   ddl m}  d S r/   )Znumpy.random._examples.cffir   r0   r,   r,   r-   	test_cffi]   s    r2   )"r   Zpytestr   r   r   warningsnumpyr%   Znumpy.distutils.misc_utilr   ZcffiImportErrorflagsoptimizecatch_warningswfilterwarningsDeprecationWarningZnumbar   ZCython.Compiler.Versionr   Zcython_versionZnumpy.compatr   required_versionparseVersionmarkZskipifZslowr.   r1   r2   r,   r,   r,   r-   <module>   sJ   
*

*
