
    (ph                         S r / SQrSSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  SSKJ
r
  \	R                  r\	R                  r      SS jrS	 rS
 rS rg)a3  Fortran to Python Interface Generator.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the terms
of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.
)run_maincompileget_include    N)VisibleDeprecationWarning   )f2py2e)diagnosec                 b   SSK nSSKnUc(  UR                  US9u  p[        R                  " U	5        OUn
[        U [        5      (       d  [        U S5      n  [        U
S5       n	U	R                  U 5        SSS5        SSUW	R                  /n[        U[        5      (       a"  [        R                  S:H  nUR                  X,S	9nUR                  U5        [        R                  SS
/U-   n [        R                  " USS9nU(       a#  [!        UR"                  R%                  5       5        Uc  [        R*                  " U
5        U(       a  U$ UR,                  $ ! , (       d  f       N= f! [&         a    [        R(                  " USSSS9n Nbf = f! Uc  [        R*                  " U
5        f f = f)a  
Build extension module from a Fortran 77 source string with f2py.

Parameters
----------
source : str or bytes
    Fortran source of module / subroutine to compile

    .. versionchanged:: 1.16.0
       Accept str as well as bytes

modulename : str, optional
    The name of the compiled python module
extra_args : str or list, optional
    Additional parameters passed to f2py

    .. versionchanged:: 1.16.0
        A list of args may also be provided.

verbose : bool, optional
    Print f2py output to screen
source_fn : str, optional
    Name of the file where the fortran source is written.
    The default is to use a temporary file with the extension
    provided by the ``extension`` parameter
extension : ``{'.f', '.f90'}``, optional
    Filename extension if `source_fn` is not provided.
    The extension tells which fortran standard is used.
    The default is ``.f``, which implies F77 standard.

    .. versionadded:: 1.11.0

full_output : bool, optional
    If True, return a `subprocess.CompletedProcess` containing
    the stdout and stderr of the compile process, instead of just
    the status code.

    .. versionadded:: 1.20.0


Returns
-------
result : int or `subprocess.CompletedProcess`
    0 on success, or a `subprocess.CompletedProcess` if
    ``full_output=True``

Examples
--------
.. literalinclude:: ../../source/f2py/code/results/compile_session.dat
    :language: python

r   N)suffixzutf-8wz-cz-mposix)r   z)import numpy.f2py as f2py2e;f2py2e.main()T)capture_output       )stdoutstderr)tempfileshlexmkstemposclose
isinstancestropenwritenamesplitextendsys
executable
subprocessrunprintr   decodeOSErrorCompletedProcessremove
returncode)source
modulename
extra_argsverbose	source_fn	extensionfull_outputr   r   ffnameargsis_posixccps                  F/var/www/html/venv/lib/python3.13/site-packages/numpy/f2py/__init__.pyr   r      sx   x ##9#5 	fc""VW%%GGFO  dJ/j#&&7*HZ@JJ^^8:<@A	*$7B
 bii&&()IIe	}};    	M,,QCLB	M IIe sI   F $E6A6F -E+ *F 
E($F +!FF FF F.c                      [         R                  R                  [         R                  R                  [        5      S5      $ )a  
Return the directory that contains the ``fortranobject.c`` and ``.h`` files.

.. note::

    This function is not needed when building an extension with
    `numpy.distutils` directly from ``.f`` and/or ``.pyf`` files
    in one go.

Python extension modules built with f2py-generated code need to use
``fortranobject.c`` as a source file, and include the ``fortranobject.h``
header. This function can be used to obtain the directory containing
both of these files.

Returns
-------
include_path : str
    Absolute path to the directory containing ``fortranobject.c`` and
    ``fortranobject.h``.

Notes
-----
.. versionadded:: 1.21.1

Unless the build system you are using has specific support for f2py,
building a Python extension using a ``.pyf`` signature file is a two-step
process. For a module ``mymod``:

* Step 1: run ``python -m numpy.f2py mymod.pyf --quiet``. This
  generates ``_mymodmodule.c`` and (if needed)
  ``_fblas-f2pywrappers.f`` files next to ``mymod.pyf``.
* Step 2: build your Python extension module. This requires the
  following source files:

  * ``_mymodmodule.c``
  * ``_mymod-f2pywrappers.f`` (if it was generated in Step 1)
  * ``fortranobject.c``

See Also
--------
numpy.get_include : function that returns the numpy include directory

src)r   pathjoindirname__file__ r   r6   r   r      s'    X 77<<1599r   c                 t    U S:X  a  SSK Jn  U" [        5      nU$ [        SR	                  [        U 5      5      e)Ntestr   )PytestTesterz!module {!r} has no attribute {!r})numpy._pytesttesterr@   __name__AttributeErrorformat)attrr@   r?   s      r6   __getattr__rF      s=     v~4H%  %%+VHd%;= 	=r   c                  L    [        [        5       R                  5       S1-  5      $ )Nr?   )listglobalskeysr=   r   r6   __dir__rK      s    	 F8+,,r   )untitled TNz.fF)__doc____all__r   r!   r   warningsnumpy.exceptionsr   rM   r   r	   r   mainr   r   rF   rK   r=   r   r6   <module>rS      sc    1 
  	  6  ??{{ "gT,:^=-r   