U
    ;vfn                     @   s:   d dl Z d dlZd dlZdd Zdd Zedkr6e  dS )    Nc                 C   s"   t d|   t|  t d d S )NzRunning %r:------)printossystem)cmd r   7/tmp/pip-unpacked-wheel-sdaoq5e2/numpy/f2py/diagnose.pyrun_command   s    
r	   c                  C   s  t  } t t  td tdt j  td tdtj  td td ttj	 td td ttj
 td tddtj  td zdd l}d	}W n* tk
r   td
t d	  d}Y nX zddlm} d	}W n, tk
r   tdt d	  d}Y nX zdd l}d}W nT tk
r|   zdd l}d	}W n, tk
rv   tdt d	  d}Y nX Y nX |rztd|j|jf  W n6 tk
r } ztd| td W 5 d }~X Y nX |r,ztd|jj	|jf  W n6 tk
r* } ztd| td W 5 d }~X Y nX |rzF|dkrXtd|jj|jjf  ntd|jj|jf  td W n6 tk
r } ztd| td W 5 d }~X Y nX z|d	krRtddd dd lm  m} td td z0td |jD ]}	|	d	d  td qW n6 tk
rP } ztd| td W 5 d }~X Y nX W n8 tk
r } ztd|d td W 5 d }~X Y nX z|dkrtddd dd lm  m}
 ntddd dd l m}
 td td ztd |
!  td W n6 tk
r4 } ztd| td W 5 d }~X Y nX W n6 tk
rn } ztd| td W 5 d }~X Y nX z.|dkrtddd ddl"m#} td td nz,tddd ddl$m#} td td W nX tk
r, } z8td|d  td!dd ddl%m#} td td W 5 d }~X Y nX | }td"dd t&|D ]L}|d d#krH|d	 d#krHt'||d	d   rHt|d	d  dd qHtd W n6 tk
r } ztd| td W 5 d }~X Y nX t |  d S )$Nr   z
os.name=%rzsys.platform=%rzsys.version:zsys.prefix:zsys.path=%r:r      zFailed to import new numpy:)f2py2ezFailed to import f2py2e:   z!Failed to import numpy_distutils:z Found new numpy version %r in %szerror:zFound f2py2e version %r in %sz&Found numpy.distutils version %r in %rz&Found numpy_distutils version %r in %rz0Importing numpy_distutils.command.build_flib ... )endokz5Checking availability of supported Fortran compilers:)verbosezD(ignore it, build_flib is obsolute for numpy.distutils 0.2.2 and up)z'Importing numpy.distutils.fcompiler ...z'Importing numpy_distutils.fcompiler ...z%Importing numpy.distutils.cpuinfo ...)cpuinfoz-Importing numpy_distutils.command.cpuinfo ...z(ignore it)z%Importing numpy_distutils.cpuinfo ...zCPU information:_)(r   getcwdchdirtempfile
gettempdirr   namesysplatformversionprefixjoinpathnumpyImportErrorexc_infoZ
numpy.f2pyr   Znumpy.distutilsnumpy_distutils__version____file__	Exception	distutilsZnumpy_distutils_versionZ"numpy_distutils.command.build_flibcommand
build_flibZall_compilersZis_availableZnumpy.distutils.fcompiler	fcompilerZnumpy_distutils.fcompilerZshow_fcompilersZnumpy.distutils.cpuinfor   Znumpy_distutils.command.cpuinfoZnumpy_distutils.cpuinfodirgetattr)_pathr   Zhas_newnumpyr   Z
has_f2py2eZhas_numpy_distutilsr"   msgr(   Zcompiler_classr)   r   cpur   r   r   r   run   s   












 

  




 2
r/   __main__)r   r   r   r	   r/   __name__r   r   r   r   <module>   s    