§
    €Ûgk  ã                   ó„   — d Z g d¢ZddlZddlZddlZddlmZ ddlmZ ej        Zej	        Z		 	 	 	 	 	 dd„Z
d„ Zd„ Zd„ ZdS )z(Fortran to Python Interface Generator.

)Úrun_mainÚcompileÚget_includeé    Né   )Úf2py2e)ÚdiagnoseÚuntitledÚ Tú.fFc                 ód  — ddl }ddl}|€.|                     |¬¦  «        \  }	}
t          j        |	¦  «         n|}
t          | t          ¦  «        st          | d¦  «        } 	 t          |
d¦  «        5 }	|	                     | ¦  «         ddd¦  «         n# 1 swxY w Y   dd||	j	        g}t          |t          ¦  «        r't          j	        dk    }| 
                    ||¬	¦  «        }|                     |¦  «         t          j        dd
g|z   }	 t          j        |d¬¦  «        }|r&t!          |j                             ¦   «         ¦  «         n(# t&          $ r t          j        |ddd¬¦  «        }Y nw xY w|€t          j        |
¦  «         n# |€t          j        |
¦  «         w w xY w|r|S |j        S )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                  úI/granary/edev/quantum/lib/python3.11/site-packages/numpy/f2py/__init__.pyr   r      s)  € ðx €O€O€OØ€L€L€LàÐØ×#Ò#¨9Ð#Ñ5Ô5‰ˆˆ5õ 	Œ�‰Œˆˆàˆå�f�cÑ"Ô"ð &Ý�V˜WÑ%Ô%ˆðÝ�%˜ÑÔð 	 Ø�GŠG�F‰OŒOˆOð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð �d˜J¨¬Ð/ˆå�j¥#Ñ&Ô&ð 	AÝœ 7Ò*ˆHØŸš Z°x˜Ñ@Ô@ˆJà�Š�JÑÔÐåŒ^ØØ8ð:à<@ñAˆð	*Ý” °$Ð7Ñ7Ô7ˆBð
 ð *Ý�b”i×&Ò&Ñ(Ô(Ñ)Ô)Ð)øøõ ð 	Mð 	Mð 	MåÔ,¨Q°¸CÈÐLÑLÔLˆBˆBˆBð	Møøøð ÐÝŒI�eÑÔÐøøð ÐÝŒI�eÑÔÐÐð øøøð ð Øˆ	àŒ}ÐsU   Á!F Á1BÂF ÂBÂF ÂBÂA1F ÄE Ä#)F Å"E1Å.F Å0E1Å1F ÆF$c                  ó†   — t           j                             t           j                             t          ¦  «        d¦  «        S )aw  
    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   r8   r   r   |   s)   € õX Œ7�<Š<�œŸš­Ñ1Ô1°5Ñ9Ô9Ð9r   c                 óŽ   — | dk    rddl m}  |t          ¦  «        }|S t          d                     t          | ¦  «        ¦  «        ‚)NÚtestr   )ÚPytestTesterz!module {!r} has no attribute {!r})Únumpy._pytesttesterrB   Ú__name__ÚAttributeErrorÚformat)ÚattrrB   rA   s      r8   Ú__getattr__rH   «   s[   € ð ˆv‚~€~Ø4Ð4Ð4Ð4Ð4Ð4Øˆ|�HÑ%Ô%ˆØˆõ ð %ß%+¢V­H°dÑ%;Ô%;ñ=ô =ð 	=r   c                  ód   — t          t          ¦   «                              ¦   «         dhz  ¦  «        S )NrA   )ÚlistÚglobalsÚkeysr?   r   r8   Ú__dir__rM   ¹   s%   € Ý•‘	”	—’Ñ Ô  F 8Ñ+Ñ,Ô,Ð,r   )r	   r
   TNr   F)Ú__doc__Ú__all__r!   r#   r   r
   r   r   r   Úmainr   r   rH   rM   r?   r   r8   ú<module>rQ      sÑ   ððð ð 1Ð
0Ð
0€à 
€
€
€
Ø Ð Ð Ð Ø 	€	€	€	à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð àŒ?€Ø„{€ð "ØØØØØðgð gð gð gðT,:ð ,:ð ,:ð^=ð =ð =ð-ð -ð -ð -ð -r   