3
ßL]  ã               @   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lm	Z	 d dl
mZ dgZejdksjejdd… d	krtejd
ƒ 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edd�jƒ ƒ dS )é    )ÚdivisionÚabsolute_importÚprint_functionN)Ú	FCompiler)Úget_exception)ÚDistutilsPlatformErrorÚCompaqFCompilerÚposixé   ÚcygwinÚCompaqVisualFCompilerc               @   s�   e Zd ZdZdZdZejdd… dkr,dZndZd	d
geddgedgegd	gddgdgdœZ	dZ
dZdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )r   ÚcompaqzCompaq Fortran Compilerz$Compaq Fortran (?P<version>[^\s]*).*Né   ÚlinuxZfortZf90z<F90>z-versionz-f77rtlz-fixedÚarz-crÚranlib)Úversion_cmdÚcompiler_f77Úcompiler_fixÚcompiler_f90Ú	linker_soÚarchiverr   z-module z-Ic             C   s   ddgS )Nz-assume no2underscorez-nomixed_str_len_arg© )Úselfr   r   úC/tmp/pip-install-q_7g0qgj/Numpy/numpy/distutils/fcompiler/compaq.pyÚ	get_flags+   s    zCompaqFCompiler.get_flagsc             C   s   ddgS )Nz-gz-check boundsr   )r   r   r   r   Úget_flags_debug-   s    zCompaqFCompiler.get_flags_debugc             C   s   dddddgS )Nz-O4z-align dcommonsz-assume bigarraysz-assume nozsizez-math_library fastr   )r   r   r   r   Úget_flags_opt/   s    zCompaqFCompiler.get_flags_optc             C   s   ddgS )Nz
-arch hostz
-tune hostr   )r   r   r   r   Úget_flags_arch2   s    zCompaqFCompiler.get_flags_archc             C   s    t jd d… dkrdgS ddgS )Nr   r   z-sharedz-Wl,-expect_unresolved,*)ÚsysÚplatform)r   r   r   r   Úget_flags_linker_so4   s    z#CompaqFCompiler.get_flags_linker_so)Ú__name__Ú
__module__Ú__qualname__Úcompiler_typeÚdescriptionÚversion_patternr   r    Úfc_exeÚexecutablesÚmodule_dir_switchÚmodule_include_switchr   r   r   r   r!   r   r   r   r   r      s(   
c               @   sh  e 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dZejdk�rddlmZ yeƒ Zejƒ  ejZW n° ek
r|   Y nž ek
r°   eƒ Zdeeƒkrªede ƒ n‚ Y nj ek
râ   eƒ ZdeeƒkrÞedeƒ e‚Y n8 ek
�r   eƒ Zdeeƒk�redeƒ e‚Y nX ddgeddgedgegdgedgddœZ dd„ Z!dd„ Z"d d!„ Z#d"d#„ Z$dS )$r   Zcompaqvz)DIGITAL or Compaq Visual Fortran CompilerzQ(DIGITAL|Compaq) Visual Fortran Optimizing Compiler Version (?P<version>[^\s]*).*z/compile_onlyz/object:z/OUT:z.libz%s%sz/module:z/Izlib.exeZDFÚwin32r   )ÚMSVCCompilerZ_MSVCCompiler__rootz1Ignoring "%s" (I think it is msvccompiler.py bug)zvcvarsall.batzUnexpected IOError inzpath']zUnexpected ValueError inz<F90>z/whatz/f77rtlz/fixedN)r   r   r   r   r   r   r   c             C   s   ddddddgS )Nz/nologoz/MDz/WXz!/iface=(cref,nomixed_str_len_arg)z/names:lowercasez/assume:underscorer   )r   r   r   r   r   p   s    zCompaqVisualFCompiler.get_flagsc             C   s   dddddgS )Nz/Oxz/fastz/optimize:5z	/unroll:0z/math_library:fastr   )r   r   r   r   r   s   s    z#CompaqVisualFCompiler.get_flags_optc             C   s   dgS )Nz/threadsr   )r   r   r   r   r   u   s    z$CompaqVisualFCompiler.get_flags_archc             C   s   dgS )Nz/debugr   )r   r   r   r   r   w   s    z%CompaqVisualFCompiler.get_flags_debug)%r"   r#   r$   r%   r&   r'   Zcompile_switchZobject_switchZlibrary_switchZstatic_lib_extensionZstatic_lib_formatr*   r+   Zar_exer(   r   r    Znumpy.distutils.msvccompilerr-   ÚmZ
initializeÚlibr   ÚAttributeErrorr   ÚmsgÚstrÚprintÚIOErrorÚeÚ__file__Ú
ValueErrorr)   r   r   r   r   r   r   r   r   r   9   s\   



Ú__main__)Úlogé   )Úcustomized_fcompilerr   )Úcompiler)Ú
__future__r   r   r   Úosr   Znumpy.distutils.fcompilerr   Znumpy.distutils.compatr   Údistutils.errorsr   Z	compilersÚnamer    Úappendr   r   r"   Ú	distutilsr9   Úset_verbosityZnumpy.distutilsr;   r3   Úget_versionr   r   r   r   Ú<module>   s   
&A
