ó
ØÆ÷Xc           @` sx   d  d l  m Z m Z m Z d  d l m Z d  d l m Z g  d „ Z d e f d „  ƒ  YZ	 d e f d „  ƒ  YZ
 d	 S(
   i    (   t   divisiont   absolute_importt   print_function(   t   Command(   t   logc         C` sM   |  r
 d  S|  j  d ƒ d d l m } d d  l } | j j } | | ƒ d  S(   Ni   i    (   t   show_fcompilers(   t   appendt   numpy.distutils.fcompilerR   t   distutils.coret   coret   _setup_distribution(   t   _cacheR   t	   distutilst   dist(    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyt   show_fortran_compilers   s     t	   config_fcc           B` sw   e  Z d  Z d Z d d d d  d! d" d# d$ d% d& g
 Z d d d e f g Z d d d g Z d „  Z	 d „  Z
 d „  Z RS('   s”    Distutils command to hold user specified options
    to Fortran compilers.

    config_fc command is used by the FCompiler.customize() method.
    s2   specify Fortran 77/Fortran 90 compiler informations
   fcompiler=s   specify Fortran compiler types   f77exec=s   specify F77 compiler commands   f90exec=s   specify F90 compiler commands	   f77flags=s   specify F77 compiler flagss	   f90flags=s   specify F90 compiler flagss   opt=s   specify optimization flagss   arch=s0   specify architecture specific optimization flagst   debugt   gs"   compile with debugging informationt   noopts   compile without optimizationt   noarchs+   compile without arch-dependent optimizations   help-fcompilers    list available Fortran compilersc         C` s^   d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _	 d  |  _
 d  S(   N(   t   Nonet	   fcompilert   f77exect   f90exect   f77flagst   f90flagst   optt   archR   R   R   (   t   self(    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyt   initialize_options.   s    									c         C` si  t  j d ƒ |  j d ƒ } |  j d ƒ } |  j d ƒ } |  j d ƒ } |  | | | | g } xd g D]ù } g  } xc | D][ } t | | ƒ }	 |	 d  k	 r{ t |	 t ƒ s· |	 j }	 n  |	 | k rÖ | j |	 ƒ qÖ q{ q{ W| sé d  }
 n
 | d }
 t	 | ƒ d k rt  j
 d	 | | f ƒ n  |
 rh x9 | D]. } t | | ƒ d  k r,t | | |
 ƒ q,q,Wqh qh Wd  S(
   NsT   unifing config_fc, config, build_clib, build_ext, build commands --fcompiler optionst
   build_clibt	   build_extt   configt   buildR   i    i   sJ     commands have different --%s options: %s, using first in list as default(   R   t   infot   get_finalized_commandt   getattrR   t
   isinstancet   strt   compiler_typeR   t   lent   warnt   setattr(   R   R   R   R    R!   t   cmd_listt   at   lt   ct   vt   v1(    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyt   finalize_options:   s2       	
	 c         C` s   d  S(   N(    (   R   (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyt   runQ   s    N(   s
   fcompiler=Ns   specify Fortran compiler type(   s   f77exec=Ns   specify F77 compiler command(   s   f90exec=Ns   specify F90 compiler command(   s	   f77flags=Ns   specify F77 compiler flags(   s	   f90flags=Ns   specify F90 compiler flags(   s   opt=Ns   specify optimization flags(   s   arch=Ns0   specify architecture specific optimization flags(   s   debugR   s"   compile with debugging information(   s   nooptNs   compile without optimization(   s   noarchNs+   compile without arch-dependent optimization(   t   __name__t
   __module__t   __doc__t   descriptionR   t   user_optionsR   t   help_optionst   boolean_optionsR   R1   R2   (    (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyR      s$   				t	   config_ccc           B` s8   e  Z d  Z d Z d g Z d „  Z d „  Z d „  Z RS(	   sN    Distutils command to hold user specified options
    to C/C++ compilers.
    s"   specify C/C++ compiler informations	   compiler=s   specify C/C++ compiler typec         C` s   d  |  _ d  S(   N(   R   t   compiler(   R   (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyR   `   s    c         C` si  t  j d ƒ |  j d ƒ } |  j d ƒ } |  j d ƒ } |  j d ƒ } |  | | | | g } xd g D]ù } g  } xc | D][ } t | | ƒ }	 |	 d  k	 r{ t |	 t ƒ s· |	 j }	 n  |	 | k rÖ | j |	 ƒ qÖ q{ q{ W| sé d  }
 n
 | d }
 t	 | ƒ d k rt  j
 d	 | | f ƒ n  |
 rh x9 | D]. } t | | ƒ d  k r,t | | |
 ƒ q,q,Wqh qh Wd  S(
   NsS   unifing config_cc, config, build_clib, build_ext, build commands --compiler optionsR   R   R    R!   R;   i    i   sJ     commands have different --%s options: %s, using first in list as default(   R   R"   R#   R$   R   R%   R&   R'   R   R(   R)   R*   (   R   R   R   R    R!   R+   R,   R-   R.   R/   R0   (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyR1   c   s4       	
	 c         C` s   d  S(   N(    (   R   (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyR2   {   s    N(   s	   compiler=Ns   specify C/C++ compiler type(	   R3   R4   R5   R6   R   R7   R   R1   R2   (    (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyR:   U   s   			N(   t
   __future__R    R   R   R   R   t   numpy.distutilsR   R   R   R:   (    (    (    sF   /tmp/pip-build-X4mzal/numpy/numpy/distutils/command/config_compiler.pyt   <module>   s
   	D