o
    Ô­jª  ã                   @   sè   d dl Z d dlmZ d dlmZmZ g d¢Zdd„ ZG dd„ deƒZG d	d
„ d
eƒZ	G dd„ de	ƒZ
G dd„ de	ƒ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edd� ¡ ƒ dS dS )é    N©Úsimple_version_match)Ú	FCompilerÚdummy_fortran_file)ÚIntelFCompilerÚIntelVisualFCompilerÚIntelItaniumFCompilerÚIntelItaniumVisualFCompilerÚIntelEM64VisualFCompilerÚIntelEM64TFCompilerc                 C   s   t d| f d�S )Nz"Intel.*?Fortran.*?(?:%s).*?Version©Ústartr   )Útype© r   ú\/var/www/html/CropPilot/venv/lib/python3.10/site-packages/numpy/distutils/fcompiler/intel.pyÚintel_version_match   s   r   c                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚBaseIntelFCompilerc                 C   s*   t ƒ }dddd|d d|d g| jd< d S )	Nú<F77>ú-FIz-Vz-cú.fz-oú.oÚversion_cmd©r   Úexecutables©ÚselfÚfr   r   r   Úupdate_executables   s   ÿz%BaseIntelFCompiler.update_executablesc                 C   s   d|vsJ ‚d| S )Nú,z-Wl,-rpath=%sr   ©r   Údirr   r   r   Úruntime_library_dir_option   s   z-BaseIntelFCompiler.runtime_library_dir_optionN)Ú__name__Ú
__module__Ú__qualname__r   r!   r   r   r   r   r      s    r   c                   @   s†   e Zd ZdZdZdZedƒZddgZdg d¢dgdd	gd
dgddgdgdœZ	dgZ
dZdZdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )r   Úintel)Úifortz&Intel Fortran Compiler for 32-bit appsú32-bit|IA-32r&   ÚifcN)Nz-72ú-w90ú-w95r   ú<F90>ú-sharedÚarú-crÚranlib)r   Úcompiler_f77Úcompiler_f90Úcompiler_fixÚ	linker_soÚarchiverr/   ú-fPICz-module z-Ic                 C   ó   dgS )Nz-FRr   ©r   r   r   r   Úget_flags_free5   ó   zIntelFCompiler.get_flags_freec                 C   r6   )Nr5   r   r7   r   r   r   Ú	get_flags8   r9   zIntelFCompiler.get_flagsc                 C   s2   |   ¡ }|r|dk rdnd}dddddd	 |¡gS )
NÚ15ÚopenmpÚqopenmpz	-fp-modelÚstrictz-O1z-assumeÚminus0z-{})Úget_versionÚformat)r   ÚvÚmpoptr   r   r   Úget_flags_opt;   s
   ÿzIntelFCompiler.get_flags_optc                 C   ó   g S ©Nr   r7   r   r   r   Úget_flags_archA   ó   zIntelFCompiler.get_flags_archc                 C   sv   t  | ¡}|  ¡ }|r|dkr| d¡ tjdkr9z| d¡}| d¡ W n ty0   d}Y nw ddg|||…< |S )Nz8.0z-nofor_mainÚdarwinr,   r   z-dynamiclibz-Wl,-undefined,dynamic_lookup)	r   Úget_flags_linker_sor@   ÚappendÚsysÚplatformÚindexÚremoveÚ
ValueError)r   ÚoptrB   Úidxr   r   r   rJ   D   s   



ÿz"IntelFCompiler.get_flags_linker_so)r"   r#   r$   Úcompiler_typeÚcompiler_aliasesÚdescriptionr   Úversion_matchÚpossible_executablesr   Ú	pic_flagsÚmodule_dir_switchÚmodule_include_switchr8   r:   rD   rG   rJ   r   r   r   r   r      s,    ù
r   c                   @   sP   e Zd ZdZdZdZedƒZg d¢Zdg d¢ddgdgd	d
gddgdgdœZ	dS )r   Úinteler   z'Intel Fortran Compiler for Itanium appszItanium|IA-64©r&   ÚefortÚefcN©Nr   r)   r*   r   r+   r,   r-   r.   r/   ©r   r0   r2   r1   r3   r4   r/   ©
r"   r#   r$   rS   rT   rU   r   rV   rW   r   r   r   r   r   r   T   ó    
ùr   c                   @   sP   e Zd ZdZdZdZedƒZg d¢Zdddgddgdgdd	gd
dgdgdœZ	dS )r   Úintelemr   z&Intel Fortran Compiler for 64-bit appsz)EM64T-based|Intel\(R\) 64|64|IA-64|64-bitr\   Nr   r+   r,   r-   r.   r/   r`   ra   r   r   r   r   r   h   rb   r   c                   @   s–   e Zd ZdZdZedƒZdd„ ZdZddgZ	d	d	gd	gd	gd	ged
dgd	dœZ
dZdZdZdZdZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )r   Úintelvz-Intel Visual Fortran Compiler for 32-bit appsr'   c                 C   s(   t ƒ }ddd|d d|d g| jd< d S )Nr   z/FIz/cr   z/or   r   r   r   r   r   r   r   „   s   ÿz'IntelVisualFCompiler.update_executableszlib.exer&   ÚiflNú/verboseú/OUT:r`   z/c z/Foz/module:z/Ic                 C   s   g d¢}|S )N)z/nologoz/MDz/nbsz/names:lowercasez/assume:underscorez/fppr   )r   rQ   r   r   r   r:   œ   s   zIntelVisualFCompiler.get_flagsc                 C   rE   rF   r   r7   r   r   r   r8   ¡   rH   z#IntelVisualFCompiler.get_flags_freec                 C   ó   ddgS )Nz/4Ybz/d2r   r7   r   r   r   Úget_flags_debug¤   ó   z$IntelVisualFCompiler.get_flags_debugc                 C   rh   )Nz/O1z/assume:minus0r   r7   r   r   r   rD   §   rj   z"IntelVisualFCompiler.get_flags_optc                 C   rh   )Nz
/arch:IA32z/QaxSSE3r   r7   r   r   r   rG   ª   rj   z#IntelVisualFCompiler.get_flags_archc                 C   s   t ‚rF   )ÚNotImplementedErrorr   r   r   r   r!   ­   rH   z/IntelVisualFCompiler.runtime_library_dir_option)r"   r#   r$   rS   rU   r   rV   r   Úar_exerW   r   Úcompile_switchÚobject_switchÚlibrary_switchrY   rZ   r:   r8   ri   rD   rG   r!   r   r   r   r   r      s4    ù
r   c                   @   sP   e Zd ZdZdZedƒZdgZej	Z	dg d¢g d¢dgdd	ge	d
dgddœZ
dS )r	   Úintelevz.Intel Visual Fortran Compiler for Itanium appsÚItaniumÚeflNr_   )Nr   z-4L72z-wr+   r,   rf   rg   r`   )r"   r#   r$   rS   rU   r   rV   rW   r   rl   r   r   r   r   r   r	   ±   s    
ùr	   c                   @   s&   e Zd ZdZdZedd�Zdd„ ZdS )r
   Úintelvemz-Intel Visual Fortran Compiler for 64-bit appszIntel\(R\).*?64,r   c                 C   rE   rF   r   r7   r   r   r   rG   Ë   rH   z'IntelEM64VisualFCompiler.get_flags_archN)r"   r#   r$   rS   rU   r   rV   rG   r   r   r   r   r
   Å   s
    
r
   Ú__main__)Úlogé   )Úcustomized_fcompilerr%   )Úcompiler)rL   Únumpy.distutils.ccompilerr   Únumpy.distutils.fcompilerr   r   Ú	compilersr   r   r   r   r   r   r	   r
   r"   Ú	distutilsru   Úset_verbosityÚnumpy.distutilsrw   Úprintr@   r   r   r   r   Ú<module>   s$   62

ü