B
    n\                 @   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d
 G dd deZG dd
 d
eZedkrd dlmZ ed d dlmZ eedd  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-fixedZ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   ?lib/python3.7/site-packages/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  ejZW n ek
r|   Y n ek
r   e Zdeekrede  n Y nj ek
r   e Zdeekre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DFZ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   )Zcompiler)Z
__future__r   r   r   osr   Znumpy.distutils.fcompilerr   Znumpy.distutils.compatr   Zdistutils.errorsr   Z	compilersnamer   appendr   r   r!   Z	distutilsr7   Zset_verbosityZnumpy.distutilsr9   r1   Zget_versionr   r   r   r   <module>   s   
&A
