σ
Ϊ6e]c           @` sj  d  d l  m Z m Z m Z d  d l Z d  d l m Z m Z d  d l m Z d  d l	 m
 Z
 m Z m Z d d g Z d e f d     YZ e j d k rΐ d  d l Z d e f d     YZ n& d  d l m Z d e f d     YZ e d k rfd  d l m Z e j d  d  d l m Z d e j k rJe e d d  j    qfe e d d  j    n  d S(   i    (   t   divisiont   absolute_importt   print_functionN(   t	   FCompilert   dummy_fortran_file(   t   platform(   t   joint   dirnamet   normpatht   PGroupFCompilert   PGroupFlangCompilerc           B` s?  e  Z d  Z d Z d Z e d k r i d d g d 6d d g d	 6d d
 d g d 6d d g d 6d g d 6d d g d 6d g d 6Z d g Z n^ i d d g d 6d g d	 6d d
 g d 6d g d 6d g d 6d d g d 6d g d 6Z d g Z d Z d Z	 d   Z
 d   Z d   Z e d k r+d   Z n	 d   Z d   Z RS(   t   pgs   Portland Group Fortran Compilers1   \s*pg(f77|f90|hpf|fortran) (?P<version>[\d.-]+).*t   darwins   <F77>s   -Vt   version_cmdt	   pgfortrans   -dynamiclibt   compiler_f77s   -Mfixedt   compiler_fixt   compiler_f90t   libtoolt	   linker_sot   ars   -crt   archivert   ranlibt    s   -fpics   -module s   -Ic         C` s   d d g } |  j  | S(   Ns   -Minform=informs   -Mnosecond_underscore(   t	   pic_flags(   t   selft   opt(    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt	   get_flags-   s    c         C` s   d g S(   Ns   -fast(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   get_flags_opt1   s    c         C` s   d g S(   Ns   -g(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   get_flags_debug4   s    c         C` s   d d d g S(   Ns   -dynamics
   -undefinedt   dynamic_lookup(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   get_flags_linker_so8   s    c         C` s
   d d g S(   Ns   -shareds   -fpic(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR   <   s    c         C` s   d | S(   Ns   -R%s(    (   R   t   dir(    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   runtime_library_dir_option?   s    (   t   __name__t
   __module__t   compiler_typet   descriptiont   version_patternR   t   executablesR   t   module_dir_switcht   module_include_switchR   R   R   R   R!   (    (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR	      s>   



					i   i   c           B` sα   e  Z d  Z d Z d Z d Z d  g Z i d d g d 6d  g d 6d  g d 6d  g d	 6d g d
 6e d d g d 6d d 6Z d Z	 d Z
 d   Z e j d d  d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   t   flangs$   Portland Group Fortran LLVM Compilers/   \s*(flang|clang) version (?P<version>[\d.-]+).*s   lib.exes   <F77>s	   --versionR   R   R   R   R   s   /verboses   /OUT:R   R   s   -module c         C` s)   t  j |   } | j d d d g  | S(   NR*   t   flangrtit   ompstub(   R   t   get_librariest   extend(   R   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR-   [   s    t   maxsizei   c         C` sI   t  j |   } t |  j d d  } | j t t | d d    | S(   s%   List of compiler library directories.R   i    s   ..t   lib(   R   t   get_library_dirsR   R'   t   appendR   R   (   R   R   t	   flang_dir(    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR1   `   s    c         C` s   g  S(   N(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR   i   s    c         C` s   g  S(   N(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   get_flags_freel   s    c         C` s   d g S(   Ns   -g(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR   o   s    c         C` s   d g S(   Ns   -O3(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR   r   s    c         C` s   g  S(   N(    (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   get_flags_archu   s    c         C` s
   t   d  S(   N(   t   NotImplementedError(   R   R    (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR!   x   s    N(   R"   R#   R$   R%   R&   t   ar_exet   possible_executablest   NoneR'   t   library_switchR(   R-   t	   functoolst	   lru_cacheR1   R   R4   R   R   R5   R!   (    (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR
   F   s.   	




							(   t   CompilerNotFoundc           B` s   e  Z d  Z d Z d   Z RS(   R*   s$   Portland Group Fortran LLVM Compilerc         C` s   t  d   d  S(   Ns!   Flang unsupported on Python < 3.5(   R=   (   R   (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   get_version   s    (   R"   R#   R$   R%   R>   (    (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyR
      s   t   __main__(   t   logi   (   t   customized_fcompilerR*   t   compilerR   (   i   i   (   t
   __future__R    R   R   t   syst   numpy.distutils.fcompilerR   R   R   t   os.pathR   R   R   t	   compilersR	   t   version_infoR;   R
   R=   R"   t	   distutilsR@   t   set_verbosityt   numpy.distutilsRA   t   argvt   printR>   (    (    (    s;   lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.pyt   <module>   s$   66