
    *i                        S r SSKrSSKrSSKrSSKJrJr  SSKJr  SSK	r	SSK
rSSKJrJr  \" \" \" \R                  5      SS5      5      rS r\	R$                  R'                  \S	S
9\	R$                  R)                  SS
9\	R$                  R+                  S\" 5       5      S 5       5       5       r\	R$                  R'                  \SS
9S 5       rg)z[Test scripts

Test that we can run executable scripts that have been installed with numpy.
    N)dirnameisfile)join)IS_WASMassert_equalz..zsetup.pyc                     [         R                  S:X  ar  [        [         R                  5      n U R	                  S5      (       a!  [
        R                  R                  U S5      /$ [
        R                  R                  U SS5      /$ [         R                  n[        UR                  5      n[        UR                  5      nSSU-   SU-   S-   U-   /$ )Nwin32Scriptsf2py.)sysplatformr   
executableendswithospathr   version_infostrmajorminor)exe_dirversionr   r   s       V/var/www/html/ai-backend/venv/lib/python3.13/site-packages/numpy/tests/test_scripts.pyfind_f2py_commandsr      s    
||w#..)I&&GGLL&122GGLL)V<== ""GMM"GMM"(<u(DEE    z Cannot test f2py command inplace)reasonzTest is unreliablef2py_cmdc                     [         R                  " U S/5      n[        UR                  5       [        R
                  R                  S5      5        g )N-vascii)
subprocesscheck_outputr   stripnp__version__encode)r   stdouts     r   	test_f2pyr(   %   s8    
 $$h%56F!6!6w!?@r   zCannot start subprocessc                      [         R                  " [        R                  SS/5      n [	        U R                  5       [        R                  R                  S5      5        g )Nz-mnumpy.f2pyr   r    )	r!   r"   r   r   r   r#   r$   r%   r&   )r'   s    r   test_pep338r*   .   s<    $$cnnnd%KLF!6!6w!?@r   )__doc__r   r!   r   os.pathr   r   r   pathjoinpytestnumpyr$   numpy.testingr   r   __file__
is_inplacer   markskipifxfailparametrizer(   r*    r   r   <module>r8      s    
  
 # $   /HWR[[14DE
F$ J'IJ./%7%9:A ; 0 KA G$=>A ?Ar   