o
    Ô­jÙ
  ã                   @   s¨   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rRd d
l	m
Z
 e
 d¡ d dlmZ edd�Zee ¡ ƒ ee ¡ ƒ dS dS )é    N)Ú	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|¡}|r| d¡S d S )NÚversion)ÚreÚsearchÚversion_patternÚgroup)ÚselfÚversion_stringÚm© r   úZ/var/www/html/CropPilot/venv/lib/python3.10/site-packages/numpy/distutils/fcompiler/nag.pyÚversion_match
   s   
zBaseNAGFCompiler.version_matchc                 C   ó   dgS )Nz-Wl,-sharedr   ©r   r   r   r   Úget_flags_linker_so   ó   z$BaseNAGFCompiler.get_flags_linker_soc                 C   r   )Nz-O4r   r   r   r   r   Úget_flags_opt   r   zBaseNAGFCompiler.get_flags_optc                 C   s   g S )Nr   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   ÚnagzNAGWare Fortran 95 Compilerz<F90>ú-VÚf95ú-fixedÚarú-crÚranlib©Úversion_cmdÚcompiler_f77Úcompiler_fixÚcompiler_f90Ú	linker_soÚarchiverr    c                 C   ó   t jdkr	ddgS t | ¡S )NÚdarwinz-unsharedf95ú/-Wl,-bundle,-flat_namespace,-undefined,suppress©ÚsysÚplatformr   r   r   r   r   r   r   '   s   

z NAGFCompiler.get_flags_linker_soc                 C   s$   |   ¡ }|r|dk rdgS t | ¡S )Nz5.1z-target=native)Úget_versionr   r   ©r   r   r   r   r   r   +   s   
zNAGFCompiler.get_flags_archc                 C   s   g d¢S )N)ú-gz-glinez-g90ú-nanz-Cr   r   r   r   r   Úget_flags_debug1   s   zNAGFCompiler.get_flags_debugN)	r   r   r   Úcompiler_typeÚdescriptionÚexecutablesr   r   r2   r   r   r   r   r      s    ù
c                   @   sN   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S )r   ÚnagforzNAG Fortran Compilerr   r   r   r   r    r!   c                 C   r(   )Nr)   z-unsharedrtsr*   r+   r   r   r   r   r   C   s
   
ÿ
z"NAGFORCompiler.get_flags_linker_soc                 C   s$   |   ¡ }|r|dkrg d¢S g d¢S )Nz6.1)r0   ú-ur1   ú-C=allú-thread_safez-kind=uniquez-Warn=allocationz-Warn=subnormal)r0   r1   r8   r7   r9   )r.   r/   r   r   r   r2   H   s   zNAGFORCompiler.get_flags_debugN)r   r   r   r3   r4   r5   r   r2   r   r   r   r   r   4   s    ù
Ú__main__)Úlogé   )Úcustomized_fcompilerr6   )Úcompiler)r,   r   Únumpy.distutils.fcompilerr   Ú	compilersr   r   r   r   Ú	distutilsr;   Úset_verbosityÚnumpy.distutilsr=   r>   Úprintr.   r2   r   r   r   r   Ú<module>   s    

ú