HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/numpy/distutils/fcompiler/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/numpy/distutils/fcompiler/__pycache__/ibm.cpython-36.pyc
3

���h�
�@s�ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZdgZGdd�de�Z
edkr�dd	lmZejd
�eedd�j��dS)
�N)�	FCompiler)�find_executable)�make_temp_file)�log�IBMFCompilerc@sheZdZdZdZdZddgdgddgdgd	gd
dgdgd
�Zdd�Zdd�Zdd�Z	dd�Z
dd�ZdS)r�ibmzIBM XL Fortran Compilerzo(xlf\(1\)\s*|)IBM XL Fortran ((Advanced Edition |)Version |Enterprise Edition V|for AIX, V)(?P<version>[^\s*]*)z<F77>z	-qversion�xlfZxlf90z-qfixedZxlf95�arz-cr�ranlib)Zversion_cmdZcompiler_f77Zcompiler_fixZcompiler_f90�	linker_so�archiverr
c
s�tj|f|�|�}|dkr�tjjd�r�td�}td�}tjj|�r�tjj|�r�yt	j
|ddg�}Wntt	jfk
r|YnXt
jd|�}|r�|jd�}d�|dkr�tjj��r�ttj���}|j��fd	d
�|D�}|r�ddlm}	|	|d�|_}|S)
N�aix�lslpprz-LcZxlfcmpz xlfcmp:(?P<version>\d+([.]\d+)+)�versionz/etc/opt/ibmcmp/xlfcs(g|] }tjjtjj�|d��r|�qS)zxlf.cfg)�os�path�isfile�join)�.0�d)�xlf_dir��>/tmp/pip-build-5_djhm0z/numpy/numpy/distutils/fcompiler/ibm.py�
<listcomp>5sz,IBMFCompiler.get_version.<locals>.<listcomp>r)�LooseVersion)r�get_version�sys�platform�
startswithrrr�exists�
subprocess�check_output�OSError�CalledProcessError�re�search�group�isdir�sorted�listdir�reverseZdistutils.versionrr)
�self�args�kwdsrrr�o�m�lrr)rrrs*
zIBMFCompiler.get_versioncCsdgS)Nz	-qextnamer)r+rrr�	get_flags;szIBMFCompiler.get_flagscCsdgS)Nz-gr)r+rrr�get_flags_debug>szIBMFCompiler.get_flags_debugc
Cs�g}tjdkr|jd�n
|jd�|jddgd�}|dk	r�tjjd�rNd}nd	|}td
d�\}}tjd|�t|d
��L}t	j
d�j}x8|D]0}||�}	|	r�|jd|	j
d��q�|j|�q�WWdQRX|j�|jd|�|S)N�darwinz/-Wl,-bundle,-flat_namespace,-undefined,suppressz-bsharedr�()Z	ok_statusr
z/etc/xlf.cfgz/etc/opt/ibmcmp/xlf/%s/xlf.cfgz_xlf.cfg)�suffixz	Creating �rz"\s*crt\s*[=]\s*(?P<path>.*)/crt1.ozcrt = %s/bundle1.o
rz-F)rr�appendrrrr�info�openr$�compile�match�writer&�close)
r+�optrZxlf_cfg�foZnew_cfg�fiZ
crt1_match�liner/rrr�get_flags_linker_soAs*


z IBMFCompiler.get_flags_linker_socCsdgS)Nz-O3r)r+rrr�
get_flags_opt[szIBMFCompiler.get_flags_optN)�__name__�
__module__�__qualname__�
compiler_type�descriptionZversion_patternZexecutablesrr1r2rBrCrrrrr
s
�__main__)�customized_fcompiler�r)�compiler)rr$rr Znumpy.distutils.fcompilerrZnumpy.distutils.exec_commandrZnumpy.distutils.misc_utilr�	distutilsrZ	compilersrrDZnumpy.distutilsrJ�
set_verbosity�printrrrrr�<module>sQ