OwlCyberSecurity - MANAGER
Edit File: __init__.cpython-38.pyc
U ���] � @ s� d Z ddlmZmZmZ dddgZddlZddlZddlZddl Z ddlmZ dd lm Z dd lmZ ejZejZddd�ZddlmZ ee�Z[dS )z(Fortran to Python Interface Generator. � )�division�absolute_import�print_function�run_main�compile�f2py_testingN� )�f2py2e)r )�diagnose�untitled� T�.fc C sF ddl }ddl}|dkr4|j|d�\}} t�|� n|} t| t�sLt| d�} z�t| d��}|� | � W 5 Q R X dd||j g} t|tjj �r�tj dk}|j||d �}| �|� tjdd g| }zt�|�} W nJ tjk r� } z|j}d} W 5 d}~X Y n" tk �r d}d} Y nX d}|�r(t| � W 5 |dk�r@t�| � X |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 Returns ------- result : int 0 on success Examples -------- .. include:: compile_session.dat :literal: r N)�suffixzutf-8�wz-cz-m�posix)r z)import numpy.f2py as f2py2e;f2py2e.main()r � )�tempfile�shlexZmkstemp�os�close� isinstance�str�remove�open�write�name�np�compatZ basestring�split�extend�sys� executable� subprocessZcheck_outputZCalledProcessError� returncode�OSError�print)�sourceZ modulenameZ extra_args�verboseZ source_fn� extensionr r �f�fname�argsZis_posix�c�output�excZstatus� r/ �5/usr/lib/python3/dist-packages/numpy/f2py/__init__.pyr sH 2 �� )�PytestTester)r r TNr )�__doc__Z __future__r r r �__all__r r"