๓
ุฦ๗Xc           @` sๆ   d  d l  m Z m Z m Z d  d l Z d  d l m Z d  d l m Z m	 Z	 d  d l
 m Z d g Z d e f d     YZ e d k rโ d  d	 l m Z e j d
  d  d l m Z e d d  Z e j   e e j    n  d S(   i    (   t   divisiont   absolute_importt   print_functionN(   t   cpu(   t	   FCompilert   dummy_fortran_file(   t	   cyg2win32t   AbsoftFCompilerc           B` s๑   e  Z d  Z d Z d d Z i d d 6d g d 6d g d 6d g d	 6d
 g d 6d d g d 6d g d 6Z e j d k r d Z	 n  d Z
 d Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   t   absofts   Absoft Corp Fortran Compilers   (f90:.*?(Absoft Pro FORTRAN Version|FORTRAN 77 Compiler|Absoft Fortran Compiler Version|Copyright Absoft Corporation.*?Version))s'    (?P<version>[^\s*,]*)(.*?Absoft Corp|)t   version_cmdt   f77t   compiler_f77t   f90t   compiler_fixt   compiler_f90s   <F90>t	   linker_sot   ars   -crt   archivert   ranlibt   nts   /out:s   -pc         C` s:   t  t    } d d d | d d | d g |  j d <d  S(   Ns   <F90>s   -Vs   -cs   .fs   -os   .oR	   (   R   R   t   executables(   t   selft   f(    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyt   update_executables1   s    	c         C` sI   t  j d k r d g } n* |  j   d k r9 d g } n d d g } | S(   NR   s   /dlls   9.0s   -shareds   -Kt   shared(   t   ost   namet   get_version(   R   t   opt(    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyt   get_flags_linker_so6   s    c         C` s%   t  j d k r d d | g Sd | S(   NR   s   -links
   /PATH:"%s"s   -L(   R   R   (   R   t   dir(    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyt   library_dir_optionC   s    c         C` s   t  j d k r d | Sd | S(   NR   s   %s.libs   -l(   R   R   (   R   t   lib(    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyt   library_optionH   s    c         C` s   t  j |   } t j j d  } | r |  j   d k rB d } n d } t j   r] d } n d } | j t j	 j
 | d | | f   n  | S(   Nt   ABSOFTs   10.0t   sht    t   64s   %slib%s(   R   t   get_library_dirsR   t   environt   getR   R   t   is_64bitt   appendt   patht   join(   R   R   t   dt   prefixt   suffix(    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyR&   M   s    		)c         C` sี   t  j |   } |  j   d k r= | j d d d d g  nu |  j   d k rk | j d d d d g  nG |  j   d k r | j d	 d
 d d g  n | j d
 d	 d d g  t j d k rั | j d  n  | S(   Ns   11.0t   af90matht   afiot   af77matht   amiscs   10.0t   U77s   8.0t   f90matht   fiot   f77matht   fmathR   t   COMDLG32(   R   t   get_librariesR   t   extendR   R   R*   (   R   R   (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyR:   ]   s    c         C` sf   t  j |   } t j d k rb | j d g  |  j   rb |  j   d k r_ | j d  q_ qb n  | S(   NR   s   -ss   8.2s   -fpic(   R   t	   get_flagsR   R   R;   R   R*   (   R   R   (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyR<   k   s    c         C` sฎ   t  j |   } | j d d d g  |  j   } t j d k rk | rช | d k rช | j d d g  qช n? | j d  | rช | d k r | j d	  qช | j d  n  | S(
   Ns   -N22s   -N90s   -N110R   s   8.0s   -fs   -N15s   4.6s   -B108(   R   t   get_flags_f77R;   R   R   R   R*   (   R   R   t   v(    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyR=   t   s    c         C` si   t  j |   } | j d d d d d d d g  |  j   re |  j   d k re | j d	 g  qe n  | S(
   Ns   -YCFRL=1s   -YCOM_NAMES=LCSs	   -YCOM_PFXs	   -YEXT_PFXs   -YCOM_SFX=_s   -YEXT_SFX=_s   -YEXT_NAMES=LCSs   4.6s   -YDEALLOC=ALL(   R   t   get_flags_f90R;   R   (   R   R   (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyR?      s    c         C` sH   t  j |   } | j d d d d d d d g  | j d d	 g  | S(
   Ns   -YCFRL=1s   -YCOM_NAMES=LCSs	   -YCOM_PFXs	   -YEXT_PFXs   -YCOM_SFX=_s   -YEXT_SFX=_s   -YEXT_NAMES=LCSs   -ft   fixed(   R   t   get_flags_fixR;   (   R   R   (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyRA      s
    c         C` s   d g } | S(   Ns   -O(    (   R   R   (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyt   get_flags_opt   s    	N(   t   __name__t
   __module__t   compiler_typet   descriptiont   version_patternt   NoneR   R   R   t   library_switcht   module_dir_switcht   module_include_switchR   R   R   R!   R&   R:   R<   R=   R?   RA   RB   (    (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyR      s6   	



													t   __main__(   t   logi   (   t   new_fcompilert   compilerR   (   t
   __future__R    R   R   R   t   numpy.distutils.cpuinfoR   t   numpy.distutils.fcompilerR   R   t   numpy.distutils.misc_utilR   t	   compilersR   RC   t	   distutilsRM   t   set_verbosityRN   RO   t	   customizet   printR   (    (    (    s?   /tmp/pip-build-X4mzal/numpy/numpy/distutils/fcompiler/absoft.pyt   <module>   s   	
