3
ßL]0
  ã               @   s¸   d dl mZmZmZ d dlZd dlZd dlmZ ddgZG dd„ deƒZ	G dd„ de	ƒZ
G d	d„ de	ƒZed
kr´d dlmZ ejdƒ d dlmZ edd�Zeejƒ ƒ eejƒ ƒ dS )é    )ÚdivisionÚabsolute_importÚprint_functionN)Ú	FCompilerÚNAGFCompilerÚNAGFORCompilerc               @   s0   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
S )ÚBaseNAGFCompilerz"NAG.* Release (?P<version>[^(\s]*)c             C   s$   t j| j|ƒ}|r|jdƒS d S d S )NÚversion)ÚreÚsearchÚversion_patternÚgroup)ÚselfZversion_stringÚm© r   ú@/tmp/pip-install-q_7g0qgj/Numpy/numpy/distutils/fcompiler/nag.pyÚversion_match   s    
zBaseNAGFCompiler.version_matchc             C   s   dgS )Nz-Wl,-sharedr   )r   r   r   r   Úget_flags_linker_so   s    z$BaseNAGFCompiler.get_flags_linker_soc             C   s   dgS )Nz-O4r   )r   r   r   r   Úget_flags_opt   s    zBaseNAGFCompiler.get_flags_optc             C   s   dgS )NÚ r   )r   r   r   r   Úget_flags_arch   s    zBaseNAGFCompiler.get_flags_archN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r   r   	   s
   r   c               @   sV   e Zd ZdZdZddgddgddgdgdgddgd	gd
œZdd„ Zdd„ Zdd„ ZdS )r   ZnagzNAGWare Fortran 95 Compilerz<F90>z-VZf95z-fixedÚarz-crÚranlib)Úversion_cmdÚcompiler_f77Úcompiler_fixÚcompiler_f90Ú	linker_soÚarchiverr   c             C   s   t jdkrddgS tj| ƒS )NÚdarwinz-unsharedf95z/-Wl,-bundle,-flat_namespace,-undefined,suppress)ÚsysÚplatformr   r   )r   r   r   r   r   )   s    
z NAGFCompiler.get_flags_linker_soc             C   s(   | j ƒ }|r|dk rdgS tj| ƒS d S )Nz5.1z-target=native)Úget_versionr   r   )r   r	   r   r   r   r   -   s    zNAGFCompiler.get_flags_archc             C   s   dddddgS )Nz-gz-glinez-g90z-nanz-Cr   )r   r   r   r   Úget_flags_debug3   s    zNAGFCompiler.get_flags_debugN)	r   r   r   Úcompiler_typeÚdescriptionÚexecutablesr   r   r&   r   r   r   r   r      s   
c               @   sF   e Zd ZdZdZddgddgddgdgdgddgdgdœZd	d
„ ZdS )r   ÚnagforzNAG Fortran Compilerz-Vz-fixedr   z-crr   )r   r   r   r   r    r!   r   c             C   s:   | j ƒ }|r(|dkr(dddddddd	gS dddddgS d S )
Nz6.1z-gz-uz-nanz-C=allz-thread_safez-kind=uniquez-Warn=allocationz-Warn=subnormal)r%   )r   r	   r   r   r   r&   E   s
    

zNAGFORCompiler.get_flags_debugN)r   r   r   r'   r(   r)   r&   r   r   r   r   r   6   s   
Ú__main__)Úlogé   )Úcustomized_fcompilerr*   )Úcompiler)Ú
__future__r   r   r   r#   r
   Znumpy.distutils.fcompilerr   Z	compilersr   r   r   r   Ú	distutilsr,   Úset_verbosityZnumpy.distutilsr.   r/   Úprintr%   r&   r   r   r   r   Ú<module>   s   

