
    CEj              	          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mZ d dlZd dl	Z
d dlmZmZ d dlmZ 	 d dlZej$                  j&                  dkD  rdZ	  ej(                  d      5 Z ej,                  dd	e       d dlZddd       	 d dlZd d
lmZ d dlmZ dZ  ejB                  e       ejD                  e       k  rdZ	 ejF                  jI                  ed      ejF                  jI                  ejJ                  dk(  xr ejL                  dk  d      ejF                  jI                  ed      ejF                  jI                  edu d      ejF                  jI                   ejN                         dk(  d      ejF                  jP                  ejF                  jS                  d      d                                                  Z*ejF                  jI                  edu xs edu d      d        Z+ejF                  jI                  edu d      d        Z,y# e$ r dZY w xY w# 1 sw Y   xY w# eef$ r dZY w xY w# e$ r dZY w xY w)    N)module_from_specspec_from_file_location)IS_EDITABLEIS_WASM)run_subprocess   T)recordalways )version)_pep440z3.0.6z)Editable install cannot find .pxd headers)reasonwin32l        z7Failing in 32-bit Windows wheel build job, skip for nowzCan't start subprocesszrequires cythonz	win-arm64z-Meson unable to find MSVC linker on win-arm64zcbuilding cython code in a subprocess doesn't make sense to do in many threads and sometimes crashesc                    dd l }t        j                  j                  t        j                  j	                  t
              d      }t        j                  || dz         | dz  dz  dz  }|dz  t        j                  d       t        |d	z        }t        |d
      5 }|j                  d       |j                  dt        j                   d       |j                  dt        j                   d       d d d        t        j                  dk(  rt        ddddd|t        |      g       nt        ddd|t        |      g       t        g d       |j                  t        dz  dz              }t        |d         5 }d}|D ]  }	||	v s n J d| d       	 d d d        t!        j"                  d      fd}
 |
d        |
d        |
d       }dd!lm} |j)                   |d      d"d#      }|j*                  d$k(  sJ |j,                  t.        j0                  k(  sJ y # 1 sw Y   7xY w# 1 sw Y   xY w)%Nr   z..random	_examplescythonbuildT)exist_okzinterpreter-native-file.iniwz[binaries]
z
python = 'z'
zpython3 = ''r   mesonsetupz--buildtype=releasez--vsenvz--native-file)r   compilez-vv*zextending.pyx.cz+NumPy API declarations from "numpy/__init__zCould not find 'z' in C file, wrong pxd used
EXT_SUFFIXc                     | z  j                        }t        | |      }t        |      }|j                  j	                  |       |S )N)with_suffixr   r   loaderexec_module)modnamesospecmodsuffix
target_dirs       o/var/www/html/eeg-assistent/strom-signal/venv/lib/python3.12/site-packages/numpy/random/tests/test_extending.pyloadztest_cython.<locals>.loadi   sE    7"//7&w3t$$
    	extendingextending_cppextending_distributions)PCG64
   d)r.   )globospathjoindirname__file__shutilcopytreemakedirsstropenwritesys
executableplatformr   	sysconfigget_config_varnumpy.randomr-   uniforms_exshapedtypenpfloat64)tmp_pathr0   srcdir	build_dirnative_filefgfidtxt_to_findliner(   r,   r-   valuesr%   r&   s                 @@r'   test_cythonrQ   /   s<   $ WW\\"''//(3T:F
OOFHx/08#k1H<IW$JKK
T* i"??@K	k3	 11		*S^^,C01	+cnn-Q/01 ||w-!?KI( "		# 	'c)nF!	# .
;
 			#j3&)::;<A	ad VsC 	VDd"	V V,[M9TUU5 	V %%l3F 	"#<="$00q2sCF<<5   <<2::%%%[1 1(V Vs   "AH/H<H</H9<Izrequires numba and cffic                      ddl m}  y Nr   r*   )numpy.random._examples.numbar*   rT   s    r'   
test_numbarV   z   s     7r)   zrequires cffic                      ddl m}  y rS   )numpy.random._examples.cffir*   rT   s    r'   	test_cffirY      s    5r)   )-r1   r6   r<   r?   warningsimportlib.utilr   r   pytestnumpyrE   numpy.testingr   r   numpy.testing._private.utilsr   cffiImportErrorflagsoptimizecatch_warningsr   filterwarningsDeprecationWarningnumbaSystemErrorr   Cython.Compiler.Versionr   cython_versionnumpy._utilsr   required_versionparseVersionmarkskipifr>   maxsizeget_platformslowthread_unsaferQ   rV   rY    r)   r'   <module>rv      s   	  
   D   . 7 99 D	 	 	 	- ".@AA %w}}^$w7G'HH 6   7CKK%$7H   G$<=FdN+<=*I**,;J  L+  8&	 L > >		"8&t ETM1TT\4  6767 DDL96 :6a  D  	[! E  FsM   H! H< 'H/ H< 	
I !H,+H,/H94H< <	I	I	II