ó
ØÆ÷Xc           @` sÃ   d  Z  d d l m Z m Z m Z d d d g Z d d l Z d d l m Z d d	 l m	 Z	 d d
 l m
 Z
 e j Z e j Z d d e d d d „ Z d d l m Z e ƒ  j Z e ƒ  j Z d S(   s(   Fortran to Python Interface Generator.

i    (   t   divisiont   absolute_importt   print_functiont   run_maint   compilet   f2py_testingNi   (   t   f2py2e(   R   (   t   diagnoset   untitledt    s   .fc         C` sÑ   d d l  m } d d l } | d k r= | j d | ƒ } n t | d ƒ } zs | j |  ƒ | j ƒ  d j | | j	 | ƒ }	 d }
 |
 j t
 j |	 ƒ }
 | |
 ƒ \ } } | r¾ t | ƒ n  Wd | j ƒ  X| S(   sN  
    Build extension module from processing source with f2py.

    Parameters
    ----------
    source : str
        Fortran source of module / subroutine to compile
    modulename : str, optional
        The name of the compiled python module
    extra_args : str, optional
        Additional parameters passed to f2py
    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

    i    (   t   exec_commandNt   suffixt   ws    -c -m {} {} {}s4   {} -c "import numpy.f2py as f2py2e;f2py2e.main()" {}(   t   numpy.distutils.exec_commandR
   t   tempfilet   Nonet   NamedTemporaryFilet   opent   writet   flusht   formatt   namet   syst
   executablet   printt   close(   t   sourcet
   modulenamet
   extra_argst   verboset	   source_fnt	   extensionR
   R   t   ft   argst   ct   statust   output(    (    s2   /tmp/pip-build-X4mzal/numpy/numpy/f2py/__init__.pyR      s      
(   t   _numpy_tester(   t   __doc__t
   __future__R    R   R   t   __all__R   R	   R   R   R   R   t   maint   TrueR   R   t   numpy.testing.nosetesterR%   t   testt   bench(    (    (    s2   /tmp/pip-build-X4mzal/numpy/numpy/f2py/__init__.pyt   <module>   s    		0