v]c@`sVddlmZmZmZddlZddlZddlZddlZddlZddl m Z ddl m Z ddl mZddlmZddlmZmZddl 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((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyR#'s:       cC`sddlm}ddlm}|j}|dkrD|j|_ny||f|}Wn3||fk rtt||_|nX||_|S(Ni(R(tDistutilsExecErrorRR(RR(tdistutils.ccompilerRtdistutils.errorsR>RRtstrR(RtmthtlangtargsRR>t save_compilertret((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyt _wrap_methodYs      cC`sH|jtj|||||f\}}|jj|d||fS(Ns.d(RGRt_compilet temp_filesR4(Rtbodytheaderst include_dirsRCtsrctobj((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRHhsc C`sz|jjdkr3|pg}|p(g}|d krd}|jrx~|jjpYgD]j}|jdrytjdd|g}Wnttjfk rqXt |}n|j |qZWx9|jj pgD]"}||kr|j |qqWqnxH|D]}|jdr)qnt } xI|p;gD];} t jj| d|} t jj| r<t} Pq<q<W| rqnt } xy|D]q} t jj| d |} t jj| rt jj| d|} t| | |jj | t} PqqW| rqntjd ||fqWn|jjd krRt|n|jtj|||||||fS( NRRRtcs/usr/libtcygpaths-ws%s.libslib%s.as+could not find library %r in directories %stmingw32(RR(RR'Rt library_dirst startswitht subprocesst check_outputtOSErrortCalledProcessErrorR R4t librariestFalsetostpathtjointisfiletTrueRRIRtwarnR RGRt_link( RRJRKRLRXRRRCtdtlibnamet fileexiststlibdirtlibfiletlibfile2((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyR`ps^            ROcC`s |j|jd|g|S(Ns2/* we need a dummy line to make distutils happy */(R#t try_compile(RtheaderRLRRRC((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/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#Rg(RtsymbolRKRLRJ((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/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#Rg(RRjRKRLRJ((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/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#RYRHR^R.R/Rt_clean(Rt type_nameRKRLRRRJtst((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/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; } RnROs 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#RHRoRR^( RRpRKRLRRtexpectedRJRstlowtmidthigh((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/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#RnRAR4RR\ttry_link( RtfuncRKRLRXRRtdecltcallt call_argsRJ((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyt check_func;s(        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) {Rys %s(%s);s %s;s return 0;Rzs (R#titemsR4R\R{(RtfuncsRKRLRXRRR}R~RRJtftvR|RD((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pytcheck_funcs_once]s4           cC`s t|S(sUReturn the inline keyword recognized by the compiler, empty string otherwise.(R (R((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyR scC`s t|S(sWReturn the restrict keyword recognized by the compiler, empty string otherwise.(R(R((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRscC`s t|S(s*Return True if the C compiler is gcc >= 4.(R(R((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRscC`st|||S(N(R (Rt attributeRm((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyR scC`s t||S(N(R (RR((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyR scC`stjdtdd|jd \}} ynt} y5|j||||||\} } } | jWn'tk r| j} | jnXt j j d| } yt j | gdd} WnAt jk r}|j}d} n)tk r d}d} n Xt| } tt d rt j|}t j|rt j|}tjd |f|tjkrtqqn|}tjd Wn$ttfk rtjd nX|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 stackleveliiRyt.tcwdit WEXITSTATUSs subprocess exited with signal %dssuccess!sfailure.(iRy(twarningsR_tDeprecationWarningR#t GrabStdoutR`trestoret ExceptiontdataRZR[R\RTRURWt returncodeRVR thasattrRt WIFSIGNALEDtWTERMSIGRterrortsignaltSIGINTtKeyboardInterrupttinfoRRRo(RRJRKRLRXRRRCtuse_teetexitcodetoutputtgrabberRMRNtexetexct exitstatustsig((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyt get_outputsJ              N(s fcompiler=Ns!specify the Fortran compiler type(R,t __module__Rt user_optionsRRR#RGRHR`RiRkRlRrRxRYRRR RRR R R(((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRs6   2   6 T :     RcB`s,eZdZdZdZdZRS(cC`s"tj|_d|_|t_dS(NRy(R%tstdoutt sys_stdoutR(R((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyt__init__s  cC`s#|jj||j|7_dS(N(RtwriteR(RR((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRscC`s|jjdS(N(Rtflush(R((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRscC`s|jt_dS(N(RR%R(R((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRs(R,RRRRR(((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyRs   ("t __future__RRRRZRRR%RTtdistutils.command.configRRRR.Rtdistutils.file_utilRR?RRtnumpy.distutils.exec_commandR t numpy.distutils.mingw32ccompilerR t numpy.distutils.command.autodistR R R RRtnumpy.distutils.compatRtobjectR(((sn/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/distutils/command/config.pyts&    (