ó 2ÄÈ[c@`sîddlmZmZmZddlZddlZddlZddlmZddl m Z m Z ddl m Z ddlmZdgZdefd„ƒYZed krêdd lmZejd ƒeed d ƒjƒƒndS(i(tdivisiontabsolute_importtprint_functionN(t FCompiler(t exec_commandtfind_executable(tmake_temp_file(tlogt IBMFCompilercB`sœeZdZdZdZiddgd6dgd6dd gd 6dgd 6d gd 6ddgd6dgd6Zd„Zd„Zd„Zd„Z d„Z RS(tibmsIBM XL Fortran Compilerso(xlf\(1\)\s*|)IBM XL Fortran ((Advanced Edition |)Version |Enterprise Edition V|for AIX, V)(?P[^\s*]*)ss -qversiont version_cmdtxlft compiler_f77txlf90s-qfixedt compiler_fixt compiler_f90txlf95t linker_sotars-crtarchivertranlibc O`sltj|||Ž}|dkrµtjjdƒrµtdƒ}tdƒ}tjj |ƒrµtjj |ƒrµt |dƒ\}}t j d|ƒ}|r²|j dƒ}q²qµnd} |dkrhtjj| ƒrhttj| ƒƒ} | jƒg| D]0} tjjtjj| | dƒƒrÿ| ^qÿ} | rhd d lm} | | d ƒ|_}qhn|S( NtaixtlslppR s -Lc xlfcmps xlfcmp:(?P\d+([.]\d+)+)tversions/etc/opt/ibmcmp/xlfsxlf.cfgi(t LooseVersion(Rt get_versiontNonetsystplatformt startswithRtostpathtexistsRtretsearchtgrouptisdirtsortedtlistdirtreversetisfiletjointdistutils.versionRR( tselftargstkwdsRRR tstotmtxlf_dirtltdR((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pyRs$  $ =cC`sdgS(Ns -qextname((R+((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pyt get_flags8scC`sdgS(Ns-g((R+((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pytget_flags_debug;sc C`s;g}tjdkr%|jdƒn |jdƒ|jdddgƒ}|dk r7tjjdƒrqd}n d |}td d ƒ\}}tjd |ƒt |d ƒ}t j dƒj }xJ|D]B}||ƒ} | rþ|j d| jdƒƒqÉ|j |ƒqÉW|jƒ|jƒ|jd|ƒn|S(Ntdarwins/-Wl,-bundle,-flat_namespace,-undefined,suppresss-bsharedt ok_statusii(Rs /etc/xlf.cfgs/etc/opt/ibmcmp/xlf/%s/xlf.cfgtsuffixs_xlf.cfgs Creating trs"\s*crt\s*[=]\s*(?P.*)/crt1.oscrt = %s/bundle1.o Rs-F(RRtappendRRRRRtinfotopenR!tcompiletmatchtwriteR#tclose( R+toptRtxlf_cfgtfotnew_cfgtfit crt1_matchtlineR0((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pytget_flags_linker_so>s,        cC`sdgS(Ns-O3((R+((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pyt get_flags_optYs( t__name__t __module__t compiler_typet descriptiontversion_patternt executablesRR4R5RHRI(((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pyRs            t__main__(tcustomized_fcompileritcompilerR (t __future__RRRRR!Rtnumpy.distutils.fcompilerRtnumpy.distutils.exec_commandRRtnumpy.distutils.misc_utilRt distutilsRt compilersRRJtnumpy.distutilsRQt set_verbositytprintR(((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/fcompiler/ibm.pyts    N