ó 2ÄÈ[c@`sódZddlmZmZmZddlZddlmZmZddl Tddl m Z ddl m Z ddlmZejdd kr¤d d lmZndd lmZd „Ze ed eƒdddd„Ze edeƒdS(s> unixccompiler - can handle very long argument lists for ar. i(tdivisiontabsolute_importtprint_functionN(tDistutilsExecErrort CompileError(t*(treplace_method(t get_exception(t_commandline_dep_stringii(tlogc C`s8|j}|ddkrjd|kr5|jdƒnd|krQ|jdƒn|dg7}||_ndtjkrCddlm}djtjdjƒƒ} dj|dƒdjƒƒ} dj|jƒ} | | kr| j| | ƒ} | jƒ|_ndj|j ƒ} | | krC| jƒ| jƒ|_ qCnd tj j |jdƒ|f} t |d t ƒrŽd d |d g}ng}y3|j|j||d|g||d| ƒWn,tk rõttƒƒ}t|ƒ‚nX|r4t|d dƒ }|jt|||ƒƒWdQXndS(s9Compile a single source files with a Unix-style compiler.itaCCs-Aes-Aas-AAtOPT(tget_config_varst s%s: %st _auto_dependss-MMDs-MFs.ds-otdisplaytaN(t compiler_sotremovetostenvirontdistutils.sysconfigR tjointsplittreplacet linker_sotpathtbasenametgetattrtFalsetspawnRtstrRRtopentwriteR(tselftobjtsrctexttcc_argstextra_postargstpp_optstccompR topttgcv_opttccomp_stllink_sRtdepstmsgtf((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/unixccompiler.pytUnixCCompiler__compiles@       #! t_compilec C`s”|j||ƒ\}}|j|d|ƒ}|j||ƒr€ytj|ƒWnttfk rinX|jtjj |ƒƒ||j }xk|rý|d }|d}dtjj |j dƒt |ƒ|f}|j|j |g|d|ƒq“W|jrdtjj |jdƒ|f}y!|j|j|gd|ƒWq}tk ryttƒƒ} t| ƒ‚q}Xqntjd|ƒdS( sŒ Build a static library in a separate sub-process. Parameters ---------- objects : list or tuple of str List of paths to object files used to build the static library. output_libname : str The library name as an absolute or relative (if `output_dir` is used) path. output_dir : str, optional The path to the output directory. Default is None, in which case the ``output_dir`` attribute of the UnixCCompiler instance. debug : bool, optional This parameter is not used. target_lang : str, optional This parameter is not used. Returns ------- None t output_diri2s %s: adding %d object files to %siRs%s:@ %ssskipping %s (up-to-date)N(t_fix_object_argstlibrary_filenamet _need_linkRtunlinktIOErrortOSErrortmkpathRtdirnametobjectsRtarchivertlenRtranlibRRRtLibErrorR tdebug( R"R<toutput_libnameR3RAt target_langtoutput_filenamet tmp_objectsRR/((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/unixccompiler.pytUnixCCompiler_create_static_libGs8         tcreate_static_lib(t__doc__t __future__RRRRtdistutils.errorsRRtdistutils.unixccompilertnumpy.distutils.ccompilerRtnumpy.distutils.compatRtnumpy.distutils.misc_utilRtsyst version_infotR tnumpy.distutilsR1t UnixCCompilertNoneRF(((s</tmp/pip-build-fiC0ax/numpy/numpy/distutils/unixccompiler.pyts   /B