ó
ÿ¼÷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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/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-2Vcwy8/numpy/numpy/distutils/fcompiler/absoft.pyRA      s
    c         C` s   d g } | S(   Ns   -O(    (   R   R   (    (    s?   /tmp/pip-build-2Vcwy8/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-2Vcwy8/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-2Vcwy8/numpy/numpy/distutils/fcompiler/absoft.pyt   <module>   s   	ˆ
