o
    k)hl                     @   s`  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 d dl	Z	d dl
Z
ddlmZ d dlmZ d dlmZ dd	 Zed
dZdddZe
jdddd Ze
jdddd Ze
jdddd Ze
jdddd Ze
jdddd Ze
jdddd Zdd Zdd  Zd!d" Zd#d$ Zd%d& Z d'd( Z!e
j"j#ej$d)kd*d+d,d- Z%e
j"j#e	& d.kpej$d)kd/d+d0d1 Z'e
j"j(d2d3 Z)d4d5 Z*d6d7 Z+d8d9 Z,d:d; Z-d<d= Z.d>d? Z/d@dA Z0dBdC Z1dDdE Z2dFdG Z3dHdI Z4dJdK Z5dLdM Z6dNdO Z7e
j"j8dPd+dQdR Z9dSdT Z:dUdV Z;dWdX Z<dYdZ Z=d[d\ Z>d]d^ Z?d_d` Z@dadb ZAdcdd ZBe
j"j8dPd+dedf ZCe
j"j#e	& d.kpHej$d)kdgd+dhdi ZDe
j"j#e	& d.kp^ej$d)kdgd+djdk ZEdldm ZFdndo ZGdpdq ZHdrds ZIdtdu ZJdvdw ZKdxdy ZLdzd{ ZMd|d} ZNd~d ZOdd ZPdd ZQdd ZRdd ZSdd ZTdd ZUdd ZVdd ZWdS )    N)Path)
namedtuple   )util)main)NOGIL_BUILDc                   C   s    t  std d S t  d S )Nz$CLI command needs a Fortran compiler)r   Zhas_fortran_compilerpytestskipf2pycli r   r   <lib/python3.10/site-packages/numpy/f2py/tests/test_f2py2e.pycompiler_check_f2pycli   s   
r   PPathsz(finp, f90inp, pyf, wrap77, wrap90, cmodfuntitledc              
   C   sR   t | }t|d|d|d|| d|| d|| ddS )ax  Takes in a temporary file for testing and returns the expected output and input paths

    Here expected output is essentially one of any of the possible generated
    files.

    ..note::

         Since this does not actually run f2py, none of these are guaranteed to
         exist, and module names are typically incorrect

    Parameters
    ----------
    fname_inp : str
                The input filename
    mname : str, optional
                The name of the module, untitled by default

    Returns
    -------
    genp : NamedTuple PPaths
            The possible paths which are generated, not all of which exist
    z.fz.f90.pyfz-f2pywrappers.fz-f2pywrappers2.f90module.c)finpf90inppyfwrap77wrap90cmodf)r   r   Zwith_suffixZ	with_name)Z	fname_inpmnameZbpathr   r   r   get_io_paths$   s   r   Zsession)Zscopec                 C   2   t dddd }|  d }|j|dd |S )'Generates a single f90 file for testingtestssrcclizhiworld.f90z	hello.f90asciiencodingr   Zgetpath	read_textZgetbasetemp
write_texttmpdir_factoryfdatfnr   r   r   hello_world_f90K      r)   c                 C   2   t dddd }|  d }|j|dd |S )z(F90 file for testing warnings in gh23598r   r   Zcrackfortranzgh23598Warn.f90r   r    r"   r%   r   r   r   gh23598_warnT   r*   r,   c                 C   r+   )z8F90 file for testing disallowed CLI arguments in ghff819r   r   r   zgh_22819.pyfr   r    r"   r%   r   r   r   gh22819_cli]   r*   r-   c                 C   r   )'Generates a single f77 file for testingr   r   r   zhi77.fzhello.fr   r    r"   r%   r   r   r   hello_world_f77f   r*   r/   c                 C   r   )r.   r   r   Zreturn_realzfoo77.fzfoo.fr   r    r"   r%   r   r   r   retreal_f77o   r*   r0   c                 C   s`   t dddd }t dddd }|  d }|  d }|j|dd	 |j|dd	 |S )
r   r   r   f2cmapzisoFortranEnvMap.f90z.f2py_f2cmapz
f2cmap.f90Zmapfiler   r    r"   )r&   r'   r1   r(   Zfmapr   r   r   
f2cmap_f90w   s   r2   c                 C   s   t |}|tdd|   t|j0 t  dd |jdD }d|vs+J d|vs1J d|v s7J d	|v s=J 	 W d   dS 1 sIw   Y  dS )zCheck that module names are handled correctly
    gh-22819
    Essentially, the -m name cannot be used to import the module, so the module
    named in the .pyf needs to be used instead

    CLI :: -m and a .pyf file
    argvf2py -m blah c                 S   s   g | ]	}|  r|jqS r   )is_filename).0itemr   r   r   
<listcomp>   s    z$test_gh22819_cli.<locals>.<listcomp>*zblahmodule.czblah-f2pywrappers.fztest_22819-f2pywrappers.fztest_22819module.czIgnoring blahN)	r   setattrsyssplitr   	switchdirparentr
   Zrglob)capfdr-   monkeypatchipathZ	gen_pathsr   r   r   test_gh22819_cli   s   "rC   c              	   C   s   t |}|tdd| d  t|j+ tjt	dd t
  W d   n1 s-w   Y  W d   dS W d   dS 1 sEw   Y  dS )zBOnly one .pyf file allowed
    gh-22819
    CLI :: .pyf files
    r3   r4   z
 hello.pyfzOnly one .pyf file per call)matchN)r   r;   r<   r=   r   r>   r?   r   raises
ValueErrorr
   )r@   r-   rA   rB   r   r   r   test_gh22819_many_pyf   s   "rG   c                 C   sz   t |dd}|j}|tdd| d  t|j t  |j	
 }d|vs+J W d    d S 1 s6w   Y  d S )Ntestr   r3   f2py z -m testzintproductf2pywrap, intpr)r   r   r;   r<   r=   r   r>   r?   r
   r   r#   )r@   r,   rA   foutlrB   wrapperr   r   r   test_gh23598_warn   s   
"rM   c                 C   s   t |}t |jd }|tdd| d|   t|j! t  | 	 \}}d|v s0J t | 
 s9J W d   dS 1 sDw   Y  dS )zIEnsures that a signature file is generated via the CLI
    CLI :: -h
    r   r3   zf2py -h  Saving signatures to fileN)r   Zstemr;   r<   r=   r   r>   r?   r
   
readouterrexists)r@   r)   rA   rB   Zopathout_r   r   r   test_gen_pyf   s   "rT   c                 C   s|   t |}|tdd|   t|j t  |  \}}d|v s&J d|v s,J W d   dS 1 s7w   Y  dS )zHEnsures that a signature file can be dumped to stdout
    CLI :: -h
    r3   zf2py -h stdout rO   zfunction hi() ! in N	r   r;   r<   r=   r   r>   r?   r
   rP   r@   r)   rA   rB   rR   rS   r   r   r   test_gen_pyf_stdout   s   "rW   c              	   C   s   t |}|tdd|   t|j> t djddd t	t
 t  |  \}}d|v s5J W d   n1 s?w   Y  W d   dS W d   dS 1 sWw   Y  dS )	zjEnsures that the CLI refuses to overwrite signature files
    CLI :: -h without --overwrite-signature
    r3   f2py -h faker.pyf 	faker.pyf	Fake newsr   r    z&Use --overwrite-signature to overwriteN)r   r;   r<   r=   r   r>   r?   r$   r   rE   
SystemExitr
   rP   )r@   r)   rA   rB   rS   errr   r   r   test_gen_pyf_no_overwrite   s   "r]   )      zPython 3.12 required)reasonc                 C   sp   t |}|tdd|   t|j t  |  \}}d|v s&J W d   dS 1 s1w   Y  dS )z@Check that modules are named correctly

    CLI :: defaults
    r3   zf2py --backend meson -c zuntitledmodule.cN)	r   r;   r<   r=   r   r>   r?   r   rP   rV   r   r   r   test_untitled_cli   s   "ra   ZLinuxzCompiler and 3.12 requiredc              	   C   sN  d}t ||d}|j}|tdd| d|   t|j t  | 	 \}}d|v s0J W d   n1 s:w   Y  |tdd  t|j t
  | 	 \}}d	|v s^J W d   n1 shw   Y  d
}|tdd| d| d  t|j t
  | 	 \}}d|v sJ W d   dS 1 sw   Y  dS )zqCheck that no distutils imports are performed on 3.12
    CLI :: --fcompiler --help-link --backend distutils
    hirI   r3   rJ   z -c --fcompiler=gfortran -m z%--fcompiler cannot be used with mesonNzf2py --help-linkzUse --dep for meson buildsZhi2z -c -m z --backend distutilsz.Cannot use distutils backend with Python>=3.12)r   r   r;   r<   r=   r   r>   r?   r   rP   r
   )r@   r)   rA   MNAMErK   rB   rR   rS   r   r   r   !test_no_py312_distutils_fcompiler   s8   
"rd   c                 C   s   t |dd}|j}d}d}|tdd| d|   t|j4 t  | 	 \}}| D ]}	d|	 d	|v s<J q0| D ]}
d
|
 d|v sMJ qAW d   dS 1 sYw   Y  dS )z9Tests that functions can be skipped
    CLI :: skip:
    rH   rI   t0 t4 t8 sd s8 s4td s0r3   rJ   z -m test skip: z=buildmodule: Could not found the body of interfaced routine "". Skipping.Constructing wrapper function ""N
r   r   r;   r<   r=   r   r>   r?   r
   rP   )r@   r0   rA   rK   rB   toskipZ	remainingrR   r\   skeyrkeyr   r   r   test_f2py_skip  s&   

"rn   c                 C   s   t |dd}|j}d}d}|tdd| d|   t|j4 t  | 	 \}}| D ]}	d|	 d	|v s<J q0| D ]}
d
|
 d|v sMJ qAW d   dS 1 sYw   Y  dS )z>Test that functions can be kept by only:
    CLI :: only:
    rH   rI   re   rf   r3   rJ   z -m test only: <buildmodule: Could not find the body of interfaced routine "rg   rh   ri   Nrj   )r@   r0   rA   rK   rB   rk   tokeeprR   r\   rl   rm   r   r   r   test_f2py_only$  s&   

"rq   c                 C   s   t |dd}|j}d}t|}d}d}	|tdd| d|	 d	| d
|   t|j4 t	  | 
 \}
}| D ]}d| d|v sHJ q<| D ]}d| d|
v sYJ qMW d   dS 1 sew   Y  dS )zfTests that it is possible to return to file processing mode
    CLI :: :
    BUG: numpy-gh #20520
    rH   rI   re   ztd s0 hiblahr3   rJ    -m z only: z : ro   rg   rh   ri   N)r   r   r   r;   r<   r=   r   r>   r?   r
   rP   )r@   r)   r0   rA   rK   rB   rk   Zipath2rp   r   rR   r\   rl   rm   r   r   r   test_file_processing_switch;  s,   

"rt   c                 C   s   d}t ||d}|j}|tdd| d|   t|j t  W d   n1 s.w   Y  t	
|js;J t	
|jsCJ dS )zHChecks the generation of files based on a module name
    CLI :: -m
    rb   rI   r3   rJ   rs   N)r   r   r;   r<   r=   r   r>   r?   r
   r   rQ   r   r   )r@   r)   rA   rc   rK   rB   r   r   r   test_mod_gen_f77Y  s   ru   c              	   C   s   d}t ||d}|j}|tdd| d| d  t|j4 t  t	d
 }| }d|v s6J W d	   n1 s@w   Y  W d	   d	S W d	   d	S 1 sXw   Y  d	S )
zCheck that pyf files are correctly generated with module structure
    CLI :: -m <name> -h pyf_file
    BUG: numpy-gh #20520
    rb   rI   r3   rJ   rs   z
 -h hi.pyfzhi.pyfzpython module hiN)r   r   r;   r<   r=   r   r>   r?   r
   r   openread)r@   r/   rA   rc   rK   rB   ZhipyfZpyfdatr   r   r   test_mod_gen_gh25263j  s    "rx   c           	      C   s$  t |dd}|j}td}td}|tdd| d  t|j	# t
  |  \}}||dus9J ||du sBJ W d   n1 sLw   Y  |tdd| d	  t|j	$ t
  |  \}}||du swJ ||dusJ W d   dS 1 sw   Y  dS )
zHLowers cases by flag or when -h is present

    CLI :: --[no-]lower
    rH   rI   zHI\(\)zhi\(\)r3   rJ   z -m test --lowerNz -m test --no-lower)r   r   recompiler;   r<   r=   r   r>   r?   r
   rP   search	r@   r/   rA   rK   rB   ZcapshiZcapslorR   rS   r   r   r   test_lower_cmodz  s(   

"r}   c           	   	   C   s4  t |dd}|j}td}td}|tdd| d|j d  t	|j
# t  |  \}}||d	us=J ||d	u sFJ W d	   n1 sPw   Y  |tdd| d|j d
  t	|j
$ t  |  \}}||d	u sJ ||d	usJ W d	   d	S 1 sw   Y  d	S )z^Lowers cases in signature files by flag or when -h is present

    CLI :: --[no-]lower -h
    rH   rI   z	Block: HIz	Block: hir3   rJ   z -h z -m test --overwrite-signatureNz) -m test --overwrite-signature --no-lower)r   r   ry   rz   r;   r<   r   r=   r   r>   r?   r
   rP   r{   r|   r   r   r   test_lower_sig  s6   

"r~   c              
   C   s   t |}d}d}|tdd| d| d|   t|j t  |  \}}d| d|v s4J W d	   d	S 1 s?w   Y  d	S )
zNEnsures that the build directory can be specified

    CLI :: --build-dir
    rr   Ztttmpr3   f2py -m rN   z --build-dir zWrote C/API module "ri   NrU   )r@   r)   rA   rB   r   ZodirrR   rS   r   r   r   test_build_dir  s   "r   c                 C   s   t |}|tdd| d  t|j! t djddd t  | 	 \}}d|v s0J W d	   d	S 1 s;w   Y  d	S )
zXEnsures that the build directory can be specified

    CLI :: --overwrite-signature
    r3   rX   z --overwrite-signaturerY   rZ   r   r    rO   N)
r   r;   r<   r=   r   r>   r?   r$   r
   rP   rV   r   r   r   test_overwrite  s   "r   c              	   C   s   t |}d}|tdd| d| d  t|jA t  |  \}}d|v s,J t | d	 }d|
 v s>J W d	   n1 sHw   Y  W d	   d	S W d	   d	S 1 s`w   Y  d	S )
zJEnsures that TeX documentation is written out

    CLI :: --latex-doc
    rr   r3   r   rN   z --latex-docDocumentation is saved to file
module.tex\documentclassNr   r;   r<   r=   r   r>   r?   r
   rP   rv   rw   r@   r)   rA   rB   r   rR   rS   Zotexr   r   r   test_latexdoc  s   "r   c              	   C   |   t |}d}|tdd| d| d  t|j t  |  \}}d|vs,J W d   dS 1 s7w   Y  dS )zMEnsures that TeX documentation is written out

    CLI :: --no-latex-doc
    rr   r3   r   rN   z --no-latex-docr   NrU   r@   r)   rA   rB   r   rR   rS   r   r   r   test_nolatexdoc     "r   c              	   C   s   t |}d}|tdd| d| d  t|jB t  |  \}}d|v s,J t d| d	 }d	|
 vs?J W d
   n1 sIw   Y  W d
   d
S W d
   d
S 1 saw   Y  d
S )zEnsures that truncated documentation is written out

    TODO: Test to ensure this has no effect without --latex-doc
    CLI :: --latex-doc --short-latex
    rr   r3   r   rN   z --latex-doc --short-latexr   ./r   r   Nr   r   r   r   r   test_shortlatex  s"   "r   c              	   C   s   t |}d}|tdd| d| d  t|jB t  |  \}}d|v s,J t d| d	 }d	|
 v s?J W d
   n1 sIw   Y  W d
   d
S W d
   d
S 1 saw   Y  d
S )zIEnsures that RsT documentation is written out

    CLI :: --rest-doc
    rr   r3   r   rN   z --rest-doc#ReST Documentation is saved to filer   zmodule.restz.. -*- rest -*-Nr   )r@   r)   rA   rB   r   rR   rS   Zorstr   r   r   test_restdoc  s   "r   c              	   C   r   )zLEnsures that TeX documentation is written out

    CLI :: --no-rest-doc
    rr   r3   r   rN   z --no-rest-docr   NrU   r   r   r   r   test_norestexdoc'  r   r   c              	   C   s   t |}d}|tdd| d| d  t|j6 t  t d| d }d|	 v s3J W d	   n1 s=w   Y  W d	   d	S W d	   d	S 1 sUw   Y  d	S )
zIEnsures that debugging wrappers are written

    CLI :: --debug-capi
    rr   r3   r   rN   z --debug-capir   r   z#define DEBUGCFUNCSN
r   r;   r<   r=   r   r>   r?   r
   rv   rw   )r@   r)   rA   rB   r   ocmodr   r   r   test_debugcapi7  s   "r   z2Consistently fails on CI; noisy so skip not xfail.c              	   C   s   t | }d}|tdd| d| d  t|j2 t  ttj	 d}t
j|ddd	}d
}td}|j|ks?J |j|ksFJ W d   dS 1 sQw   Y  dS )zEEnsures that debugging wrappers work

    CLI :: --debug-capi -c
    rr   r3   r   rN   z -c --debug-capi -c "import blah; blah.hi()"TUTF-8Zcapture_outputr!    Hello World
a   debug-capi:Python C/API function blah.hi()
debug-capi:float hi=:output,hidden,scalar
debug-capi:hi=0
debug-capi:Fortran subroutine `f2pywraphi(&hi)'
debug-capi:hi=0
debug-capi:Building return value.
debug-capi:Python C/API function blah.hi: successful.
debug-capi:Freeing memory.
        N)r   r;   r<   r=   r   r>   r?   r
   shlex
executable
subprocessruntextwrapdedentstdoutstderr)r)   rA   rB   r   cmd_runrouteoutZeerrr   r   r   test_debugcapi_bldG  s   

"r   c              	   C   s   t |}d}|tdd| d|   t|j t  W d   n1 s)w   Y  |  \}}d|v s:J |tdd| d| d  t|j t  |  \}}d|v s`J W d   dS 1 skw   Y  dS )zoEnsures that fortran subroutine wrappers for F77 are included by default

    CLI :: --[no]-wrap-functions
    rr   r3   r   rN   N Fortran 77 wrappers are saved toz --wrap-functionsrU   r   r   r   r   test_wrapfunc_defe  s    "r   c              	   C   r   )zeEnsures that fortran subroutine wrappers for F77 can be disabled

    CLI :: --no-wrap-functions
    rr   r3   r   rN   z --no-wrap-functionsr   NrU   r   r   r   r   test_nowrapfunc~  r   r   c              	   C   s   t |}d}|tdd| d| d  t|j> t  t d| d }|	 }d|v s5J d	|v s;J W d
   n1 sEw   Y  W d
   d
S W d
   d
S 1 s]w   Y  d
S )zcAdd to the include directories

    CLI :: -include
    TODO: Document this in the help string
    rr   r3   r   rN   z' -include<stdbool.h> -include<stdio.h> r   r   z#include <stdbool.h>z#include <stdio.h>Nr   )r@   r)   rA   rB   r   r   Zocmrr   r   r   test_inclheader  s$   "r   c                   C      dS )z?Add to the include directories

    CLI :: --include-paths
    Nr   r   r   r   r   test_inclpath     r   c                   C   r   )z;Add to the include directories

    CLI :: --help-link
    Nr   r   r   r   r   
test_hlink  r   r   c                 C   s   t |}|tdd| d  t|j0 t  |  \}}d|v s'J d|v s-J d|v s3J d|v s9J d|v s?J W d	   d	S 1 sJw   Y  d	S )
zOCheck that Fortran-to-Python KIND specs can be passed

    CLI :: --f2cmap
    r3   r4   z --f2cmap mapfilez!Reading f2cmap from 'mapfile' ...z&Mapping "real(kind=real32)" to "float"z'Mapping "real(kind=real64)" to "double"z,Mapping "integer(kind=int64)" to "long_long"z0Successfully applied user defined f2cmap changesNrU   )r@   r2   rA   rB   rR   rS   r   r   r   test_f2cmap  s   "r   c                 C   sv   t |}|tdd| d  t|j t  |  \}}t	|dks)J W d   dS 1 s4w   Y  dS )z)Reduce verbosity

    CLI :: --quiet
    r3   r4   z --quietr   N)
r   r;   r<   r=   r   r>   r?   r
   rP   lenrV   r   r   r   
test_quiet  s   "r   c                 C   sr   t |}|tdd| d  t|j t  |  \}}d|v s'J W d   dS 1 s2w   Y  dS )z-Increase verbosity

    CLI :: --verbose
    r3   r4   z
 --verboseZanalyzelineNrU   rV   r   r   r   test_verbose  s   "r   c                 C   sn   | tdd  tt t  |  \}}ddl}|j	|
 ks%J W d   dS 1 s0w   Y  dS )z"Ensure version

    CLI :: -v
    r3   zf2py -vr   N)r;   r<   r=   r   rE   r[   r
   rP   Znumpy__version__strip)r@   rA   rR   rS   Znpr   r   r   test_version  s   "r   c                 C   s   t | }|tdd| d  t|j& t  ttj	 d}t
j|ddd}d}|j|ks5J W d	   d	S 1 s@w   Y  d	S )
z
    CLI :: -c
    r3   r4   z -cr   Tr   r   r   N)r   r;   r<   r=   r   r>   r?   r
   r   r   r   r   r   )r)   rA   rB   r   r   r   r   r   r   test_npdistop  s   "r   z*Compiler and Python 3.12 or newer requiredc                 C   s   t | }|tdd| d  t|jC t  tj d}t	r(|d7 }n|d7 }t
|}tj|ddd	}d
}|j|ksBJ t	rKd|jv sKJ |jdksRJ W d   dS 1 s]w   Y  dS )z.
    CLI :: --no-freethreading-compatible
    r3   r4   z! -c --no-freethreading-compatible -c "import blah; blah.hi();z1import sys; assert sys._is_gil_enabled() is True"ri   Tr   r   r   zHThe global interpreter lock (GIL) has been enabled to load module 'blah'r   Nr   r;   r<   r=   r   r>   r?   r   r   r   r   r   r   r   r   
returncoder)   rA   rB   cmdr   r   r   r   r   r    test_no_freethreading_compatible  s    

"r   c                 C   s   t | }|tdd| d  t|jA t  tj d}t	r(|d7 }n|d7 }t
|}tj|ddd	}d
}|j|ksBJ |jdksIJ |jdksPJ W d   dS 1 s[w   Y  dS )z+
    CLI :: --freethreading_compatible
    r3   r4   z -c --freethreading-compatibler   z2import sys; assert sys._is_gil_enabled() is False"ri   Tr   r   r    r   Nr   r   r   r   r   test_freethreading_compatible  s   

"r   c                   C   r   )z
    CLI :: -c --fcompiler
    Nr   r   r   r   r   test_npd_fcompiler7     r   c                   C   r   )z
    CLI :: -c --compiler
    Nr   r   r   r   r   test_npd_compiler?  r   r   c                   C   r   )z$
    CLI :: -c --help-fcompiler
    Nr   r   r   r   r   test_npd_help_fcompilerG  r   r   c                   C   r   )z
    CLI :: -c --f77exec
    Nr   r   r   r   r   test_npd_f77execO  r   r   c                   C   r   )z
    CLI :: -c --f90exec
    Nr   r   r   r   r   test_npd_f90execW  r   r   c                   C   r   )z
    CLI :: -c --f77flags
    Nr   r   r   r   r   test_npd_f77flags_  r   r   c                   C   r   )z
    CLI :: -c --f90flags
    Nr   r   r   r   r   test_npd_f90flagsg  r   r   c                   C   r   )z
    CLI :: -c --opt
    Nr   r   r   r   r   test_npd_opto  r   r   c                   C   r   )z
    CLI :: -c --arch
    Nr   r   r   r   r   test_npd_archw  r   r   c                   C   r   )z
    CLI :: -c --noopt
    Nr   r   r   r   r   test_npd_noopt  r   r   c                   C   r   )z
    CLI :: -c --noarch
    Nr   r   r   r   r   test_npd_noarch  r   r   c                   C   r   )z
    CLI :: -c --debug
    Nr   r   r   r   r   test_npd_debug  r   r   c                   C   r   )z%
    CLI :: -c --link-<resource>
    Nr   r   r   r   r   test_npd_link_auto  r   r   c                   C   r   )z/
    CLI :: -c -L/path/to/lib/ -l<libname>
    Nr   r   r   r   r   test_npd_lib  r   r   c                   C   r   )z
    CLI :: -D<define>
    Nr   r   r   r   r   test_npd_define  r   r   c                   C   r   )z
    CLI :: -U<name>
    Nr   r   r   r   r   test_npd_undefine  r   r   c                   C   r   )z$
    CLI :: -I/path/to/include/
    Nr   r   r   r   r   test_npd_incl  r   r   c                   C   r   )z8
    CLI :: <filename>.o <filename>.so <filename>.a
    Nr   r   r   r   r   test_npd_linker  r   r   )r   )Xry   r   r   r<   r   Zpathlibr   collectionsr   platformr   r   r   Znumpy.f2py.f2py2er   r
   Znumpy.testing._private.utilsr   r   r   r   Zfixturer)   r,   r-   r/   r0   r2   rC   rG   rM   rT   rW   r]   ZmarkZskipifversion_infora   systemrd   Zxfailrn   rq   rt   ru   rx   r}   r~   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>   s    



'











 

'
		


