2[c@`sJddlmZmZmZddlZddlZddlZddlZddlm Z ddlm Z ddl m Z ddlmZddlmZmZddl Z ddlmZdd lmZdd lmZmZmZmZmZdd lmZd e d = 3.3). Original exception was: %s, and the Compiler class was %s ============================================================================sL============================================================================(t msvc9compileri s /MANIFESTtcompilertdry_runtforceit c_compiler(RRR(!Rt_check_compilertnumpy.distutils.fcompilerRRtsystplatformRt compiler_typet initializedt initializetIOErrorRt __class__t__name__tprintt distutilsterrorstDistutilsPlatformErrorRtget_build_versiontldflags_sharedtldflags_shared_debugtappendt isinstanceRR Rt customizet distributiont get_versiont customize_cmdtshow_customization(RRRtetmsgRtldflags((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyR#&s:       c C`sddlm}ddlm}|j}|dkrD|j|_ny||f|}Wn5||fk rtt}||_|nX||_|S(Ni(R(tDistutilsExecErrorRR(RR(tdistutils.ccompilerRtdistutils.errorsR>RRtstrR( RtmthtlangtargsRR>t save_compilertretR<((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt _wrap_methodXs     cC`sH|jtj|||||f\}}|jj|d||fS(Ns.d(RGRt_compilet temp_filesR4(Rtbodytheaderst include_dirsRCtsrctobj((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRHgsc C`se|jjdkr|pg}|p(g}|d krd}|jrxi|jjpYgD]U}|jdrtdd|gdt\}} |s| }qn|j|qZWx9|jjpgD]"} | |kr|j| qqWqnxH|D]} | jdrqnt} xI|p&gD];} t j j | d | } t j j | r't } Pq'q'W| rrqnt} xy|D]q} t j j | d | } t j j | rt j j | d | }t| ||jj|t } PqqW| rqntjd | |fqWn|jjd kr=t|n|jtj|||||||fS(NRRRtcs/usr/libtcygpaths-wtuse_tees%s.libslib%s.as+could not find library %r in directories %stmingw32(RR(RR'Rt library_dirst startswithR tFalseR4t librariestostpathtjointisfiletTrueRRIRtwarnR RGRt_link(RRJRKRLRVRSRCtdtstotlibnamet fileexiststlibdirtlibfiletlibfile2((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyR]osZ            ROcC`s |j|jd|g|S(Ns2/* we need a dummy line to make distutils happy */(R#t try_compile(RtheaderRLRSRC((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt check_headers cC`s-|jd||f}|j|||S(NsH int main(void) { #ifndef %s (void) %s; #endif ; return 0; }(R#Rf(RtsymbolRKRLRJ((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt check_decls cC`s*|jd|f}|j|||S(Ns[ int main(void) { #if %s #else #error false or undefined macro #endif ; return 0; }(R#Rf(RRiRKRLRJ((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pytcheck_macro_trues cC`s|jdi|d6}t}zOy+|j|i|d6||dt}Wntjjk rnt}nXWd|jX|S(sYCheck type availability. Return True if the type can be compiled, False otherwises_ int main(void) { if ((%(name)s *) 0) return 0; if (sizeof (%(name)s)) return 0; } tnamettypeRON(R#RURHR[R.R/Rt_clean(Rt type_nameRKRLRSRJtst((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt check_types    c C`s|jd}|j|i|d6||d|j|rd}x_|D]T}y:|j|i|d6|d6||d|j|SWqNtk rqNXqNWnd}d}d} xmtr*y7|j|i|d6| d6||d|jPWqtk r&| d}d | d} qXqW| } x||| kr| |d |} y<|j|i|d6| d6||d|j| } Wq4tk r| d}q4Xq4W|S( sCheck size of a given type.s typedef %(type)s npy_check_sizeof_type; int main (void) { static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) >= 0)]; test_array [0] = 0 ; return 0; } RmROs typedef %(type)s npy_check_sizeof_type; int main (void) { static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) == %(size)s)]; test_array [0] = 0 ; return 0; } tsizes typedef %(type)s npy_check_sizeof_type; int main (void) { static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) <= %(size)s)]; test_array [0] = 0 ; return 0; } iii(R#RHRnRR[( RRoRKRLRStexpectedRJRrtlowtmidthigh((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pytcheck_type_sizesL                  c C`s|jg} |rLt|tkr8| j|qL| jd|n| jd| jd|| jd| jd|r|dkrd}n| jd||fn| jd|| jd | jd d j| d } |j| ||||S( Nsint %s (void);s#ifdef _MSC_VERs#pragma function(%s)s#endifsint main (void) {ts %s(%s);s %s;s return 0;t}s (R#RmRAR4RRYttry_link( RtfuncRKRLRVRStdecltcallt call_argsRJ((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt check_func6s(        c C`s|jg} |rPx7|jD]&\} } | r#| jd| q#q#Wn| jdx|D]} | jd| qdW| jd| jd|r#x|D]v} | |kr || r |o| |ko|| sd} n || } | jd| | fq| jd| qWn"x|D]} | jd| q*W| jd | jd d j| d } |j| ||||S( s0Check a list of functions at once. This is useful to speed up things, since all the functions in the funcs list will be put in one compilation unit. Arguments --------- funcs : seq list of functions to test include_dirs : seq list of header paths libraries : seq list of libraries to link the code snippet to library_dirs : seq list of library paths decl : dict for every (key, value), the declaration in the value will be used for function in key. If a function is not in the dictionary, no declaration will be used. call : dict for every item (f, value), if the value is True, a call will be done to the function f. sint %s (void);s#ifdef _MSC_VERs#pragma function(%s)s#endifsint main (void) {Rxs %s(%s);s %s;s return 0;Rys (R#titemsR4RYRz(RtfuncsRKRLRVRSR|R}R~RJtftvR{RD((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pytcheck_funcs_onceXs4           cC`s t|S(sUReturn the inline keyword recognized by the compiler, empty string otherwise.(R (R((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyR scC`s t|S(sWReturn the restrict keyword recognized by the compiler, empty string otherwise.(R(R((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRscC`s t|S(s*Return True if the C compiler is gcc >= 4.(R(R((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRscC`st|||S(N(R (Rt attributeRl((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyR scC`s t||S(N(R (RR((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyR scC`stjdtddddlm}m} |jd\} } y t} y5|j||||||\} }}| j Wn't k r| j } | j nXt j jd|}t|d dd |\}} tt d rNt j|} t j|rTt j|}tjd |f|tjkrKtqKqTn|} tjd Wn$|| fk rtjdnX|j| | fS(sTry to compile, link to an executable, and run a program built from 'body' and 'headers'. Returns the exit status code of the program and its output. s +++++++++++++++++++++++++++++++++++++++++++++++++ Usage of get_output is deprecated: please do not use it anymore, and avoid configuration checks involving running executable on the target machine. +++++++++++++++++++++++++++++++++++++++++++++++++ t stacklevelii(RRiRxt.t execute_inRQt WEXITSTATUSs subprocess exited with signal %dssuccess!sfailure.(iRx(twarningsR\tDeprecationWarningR?RRR#t GrabStdoutR]trestoret ExceptiontdataRWRXRYR thasattrRt WIFSIGNALEDtWTERMSIGRterrortsignaltSIGINTtKeyboardInterrupttinfoRn(RRJRKRLRVRSRCRQRRtexitcodetoutputtgrabberRMRNtexet exitstatustsig((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt get_outputs>         N(s fcompiler=Ns!specify the Fortran compiler type(R,t __module__Rt user_optionsRRR#RGRHR]RhRjRkRqRwRURRR RRR R R(((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRs6   2   2 T :     RcB`s,eZdZdZdZdZRS(cC`s"tj|_d|_|t_dS(NRx(R%tstdoutt sys_stdoutR(R((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyt__init__s  cC`s#|jj||j|7_dS(N(RtwriteR(RR((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRscC`s|jjdS(N(Rtflush(R((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRscC`s|jt_dS(N(RR%R(R((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRs(R,RRRRR(((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyRs   (!t __future__RRRRWRRR%tdistutils.command.configRRRR.Rtdistutils.file_utilRR?RRtnumpy.distutils.exec_commandR t numpy.distutils.mingw32ccompilerR t numpy.distutils.command.autodistR R R RRtnumpy.distutils.compatRtobjectR(((s=/tmp/pip-build-fiC0ax/numpy/numpy/distutils/command/config.pyts$   (