HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/numpy/f2py/__pycache__/__init__.cpython-310.pyc
o

6��a��@s�dZgd�ZddlZddlZddlZddlmZddlmZejZej	Z							
	ddd
�Z
dd�Zejdd�dkrFdd�Z
dd�ZdSddlmZddlmZee�Z[dS)z(Fortran to Python Interface Generator.

)�run_main�compile�get_include�f2py_testing�N�)�f2py2e)�diagnose�untitled�T�.fFc	CsVddl}ddl}|dur|j|d�\}	}
t�|	�n|}
t|t�s&t|d�}zrt|
d��
}	|	�|�Wd�n1s<wYdd||	j	g}t|t�rYtj	dk}|j
||d	�}|�|�tj
dd
g|}
ztj|
tjtjd�}Wnty�tj|
dd
d
d�}Yn
w|r�t|j���W|dur�t�|
�n|dur�t�|
�ww|r�|S|jS)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
    --------
    .. include:: compile_session.dat
        :literal:

    rN)�suffixzutf-8�wz-cz-m�posix)rz)import numpy.f2py as f2py2e;f2py2e.main())�stdout�stderr��)�tempfile�shlex�mkstemp�os�close�
isinstance�str�open�write�name�split�extend�sys�
executable�
subprocess�run�PIPE�OSError�CompletedProcess�printr�decode�remove�
returncode)�source�
modulename�
extra_args�verbose�	source_fn�	extension�full_outputrr�f�fname�args�is_posix�c�cp�r7�5/usr/lib/python3/dist-packages/numpy/f2py/__init__.pyrsT<

�


��

���
���rcCstj�tj�t�d�S)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.22.0

    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__r7r7r7r8r}s,r�)��cCsN|dkrddlmm}|S|dkrddlm}|t�}|Std�t|���)Nrr�test��PytestTesterz!module {!r} has no attribute {!r})�numpy.f2py.f2py_testing�f2pyr�numpy._pytesttesterrC�__name__�AttributeError�format)�attrrrCrAr7r7r8�__getattr__�s�rKcCstt���ddhB�S)NrrA)�list�globals�keysr7r7r7r8�__dir__�srO)rrB)r	r
TNrF)�__doc__�__all__rr!rr
rrr�mainrr�version_inforKrOrrFrCrGrAr7r7r7r8�<module>s0
�k/