U
    ?h                     @   sF   d dl mZ d dlmZ d
ddZG dd deZG dd	 d	eZdS )    )Command)logNc                 C   sF   | rd S | d krg } |  d ddlm} dd l}|jj}|| d S )N   r   )show_fcompilers)appendZnumpy.distutils.fcompilerr   distutils.corecore_setup_distribution)_cacher   	distutilsdist r   Y/var/www/html/venv/lib/python3.8/site-packages/numpy/distutils/command/config_compiler.pyshow_fortran_compilers   s    
r   c                
   @   s\   e Zd ZdZdZddddddd	d
ddg
ZdddefgZdddgZdd Z	dd Z
dd ZdS )	config_fcz Distutils command to hold user specified options
    to Fortran compilers.

    config_fc command is used by the FCompiler.customize() method.
    z2specify Fortran 77/Fortran 90 compiler information)z
fcompiler=Nzspecify Fortran compiler type)zf77exec=Nzspecify F77 compiler command)zf90exec=Nzspecify F90 compiler command)z	f77flags=Nzspecify F77 compiler flags)z	f90flags=Nzspecify F90 compiler flags)zopt=Nzspecify optimization flags)zarch=Nz0specify architecture specific optimization flags)debuggz"compile with debugging information)nooptNzcompile without optimization)noarchNz+compile without arch-dependent optimizationzhelp-fcompilerNz list available Fortran compilersr   r   r   c                 C   s@   d | _ d | _d | _d | _d | _d | _d | _d | _d | _d | _	d S N)
	fcompilerZf77execZf90execZf77flagsZf90flagsoptarchr   r   r   selfr   r   r   initialize_options/   s    zconfig_fc.initialize_optionsc                 C   s   t d | d}| d}| d}| d}| ||||g}dD ]}g }|D ]8}t||}	|	d k	rPt|	tsv|	j}	|	|krP||	 qP|sd }
n|d }
t|dkrt 	d	||f  |
rD|D ]}t||d krt
|||
 qqDd S )
NzTunifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
build_clib	build_extconfigbuild)r   r   r   J  commands have different --%s options: %s, using first in list as defaultr   infoget_finalized_commandgetattr
isinstancestrcompiler_typer   lenwarnsetattrr   r   r   r   r   Zcmd_listalcvZv1r   r   r   finalize_options;   s4    






    zconfig_fc.finalize_optionsc                 C   s   d S r   r   r   r   r   r   runR   s    zconfig_fc.run)__name__
__module____qualname____doc__descriptionuser_optionsr   help_optionsboolean_optionsr   r0   r1   r   r   r   r   r      s*   
r   c                   @   s2   e Zd ZdZdZdgZdd Zdd Zdd	 Zd
S )	config_cczN Distutils command to hold user specified options
    to C/C++ compilers.
    z"specify C/C++ compiler information)z	compiler=Nzspecify C/C++ compiler typec                 C   s
   d | _ d S r   compilerr   r   r   r   r   a   s    zconfig_cc.initialize_optionsc                 C   s   t d | d}| d}| d}| d}| ||||g}dD ]}g }|D ]8}t||}	|	d k	rPt|	tsv|	j}	|	|krP||	 qP|sd }
n|d }
t|dkrt 	d	||f  |
rD|D ]}t||d krt
|||
 qqDd S )
NzSunifing config_cc, config, build_clib, build_ext, build commands --compiler optionsr   r   r   r   r;   r   r   r    r!   r+   r   r   r   r0   d   s6    






    zconfig_cc.finalize_optionsc                 C   s   d S r   r   r   r   r   r   r1   |   s    zconfig_cc.runN)	r2   r3   r4   r5   r6   r7   r   r0   r1   r   r   r   r   r:   V   s   r:   )N)r   r   Znumpy.distutilsr   r   r   r:   r   r   r   r   <module>   s   
D