3
hn                 @   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j|  t d d S )NzRunning %r:z------)printossystem)cmd r   4/tmp/pip-build-fibhr3ey/numpy/numpy/f2py/diagnose.pyrun_command   s    
r   c              C   s  t j } t jtj  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jtj  td ydd l}d	}W n* tk
r   td
tj d	  d}Y nX yddlm} d	}W n, tk
r   tdtj d	  d}Y nX ydd l}d}W nT tk
r|   ydd l}d	}W n, tk
rv   tdtj d	  d}Y nX Y nX |rytd|j|jf  W n6 tk
r } ztd| td W Y d d }~X nX |r,ytd|jj	|jf  W n6 tk
r* } ztd| td W Y d d }~X nX |ryF|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 Y d d }~X nX y|d	krPtddd dd ljj}td td y4td x&|jD ]}	|	d	dj  td qW W n6 tk
rN } ztd| td W Y d d }~X nX W n8 tk
r } ztd|d td W Y d d }~X nX y|dkrtddd dd ljj}
ntddd dd l j}
td td ytd |
j!  td W n6 tk
r* } ztd| td W Y d d }~X nX W n6 tk
rd } ztd| td W Y d d }~X nX y2|dkrtddd ddl"m#} td td ny,tddd ddl$m#} td td W nX tk
r" } z:td|d  td!dd ddl%m#} td td W Y d d }~X nX | }td"dd xXt&|D ]L}|d d#kr@|d	 d#kr@t'||d	d   r@t|d	d  dd q@W td W n6 tk
r } ztd| td W Y d d }~X nX t j|  d S )$Nz------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'   compiler_classr(   r   cpur   r   r   r   run   s   


















2
r/   __main__)r   r   r   r   r/   __name__r   r   r   r   <module>   s    