ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c@`sdZddlmZmZmZddlZddlZddlZddlZddl Z ej ddkrddl m Z nddlm Z ddlZddlmZddl mZmZdd lmZdd lmZdd lmZmZmZdd lmZm Z m!Z!m"Z"d Z#e#ej$_%ej&dZ'ej&dZ(dej$j)fdYZ*dZ+dZ,dZ-dZ.e/dZ0dZ1dZ2dZ3dZ4iZ5ej6dkrxyxddl7Z7de5dk rte j?d%qxXnd&Z@d'd(ZAd)ZBd*ZCd+ZDd,ZEd-ZFdS(.s Support code for building Python extensions on Windows. # NT stuff # 1. Make sure libpython.a exists for gcc. If not, build it. # 2. Force windows to use gcc (we're struggling with MSVC and g77 support) # 3. Force windows to use g77 i(tdivisiontabsolute_importtprint_functionNii(tlog(t StrictVersion(tgen_preprocess_optionstgen_lib_options(t UnixCCompiler(tget_build_version(tDistutilsExecErrort CompileErrortUnknownFileError(tmsvc_runtime_librarytmsvc_runtime_versiontmsvc_runtime_majortget_build_architecturecC`s t}|dkrgS|gS(sBReplacement for outdated version of get_msvcr from cygwinccompilerN(R tNone(tmsvcr((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytget_msvcr_replacement*s s\[Ordinal/Name Pointer\] Tables$^\s+\[([\s*[0-9]*)\] ([a-zA-Z0-9_]*)tMingw32CCompilercB`sPeZdZdZddddZdddddddZdddZRS(sH A modified MingW32 compiler compatible with an MSVC built Python. tmingw32ic C`sqtjjj|||||jdkrddl}tjddgdt dtj }|j j }|j j |jd|}|rt|jd|_qn|jdkrd }nd }|jd krd |_n|jdkrd |_ntt} td t } | s,| r<|jdnt} | rb|jdd| ntdkr|jdkr|jddddddddqa|jddddddddn|jdkr |jdd dd!dd"dd#|j|fnV|jdkr?|jdd$dd%dd"dd&n"|jdd'dd(dd)dd*d g|_dS(+Nitgccs -dumpversiontshelltstdouts (\d+\.\d+)is2.91.57s--entry _DllMain@12ttdllwrapsg++tdebugtNPY_MINGW_USE_CUSTOM_MSVCRt__MSVCRT_VERSION__s0x%04itAMD64s4.0tcompilers/gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wallt compiler_sosCgcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypest linker_exesgcc -g -mno-cygwint linker_sosgcc -g -mno-cygwin -shareds#gcc -g -DDEBUG -DMS_WIN64 -O0 -Walls7gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypessgcc -gsgcc -g -shareds3.0.0sgcc -mno-cygwin -O2 -ws0gcc -mno-cygwin -mdll -O2 -w -Wstrict-prototypessg++ -mno-cygwins%s -mno-cygwin -mdll -static %ssgcc -mno-cygwin -O2 -Walls-gcc -mno-cygwin -O2 -Wall -Wstrict-prototypessg++ -mno-cygwin -shareds gcc -O2 -Walls!gcc -O2 -Wall -Wstrict-prototypessg++ s g++ -shared(t distutilstcygwinccompilertCygwinCCompilert__init__t gcc_versionRtret subprocesstPopentTruetPIPERtreadtclosetsearchRtgroupt linker_dlltlinkertbuild_import_librarytbuild_msvcr_libraryt define_macroR Rtset_executablest compiler_cxx( tselftverbosetdry_runtforceR'tpt out_stringtresultt entry_pointt msvcr_successtmsvcr_dbg_successt msvcr_version((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR%?sr                  cC`st}|r.|sg}n|j|n||||||||d| | | | | f}|jdkrtjjj}n tj}|||j j dS(Ns3.0.0( R tappendRR&R"R#R$tlinkRt__code__t co_argcount(R7t target_desctobjectstoutput_filenamet output_dirt librariest library_dirstruntime_library_dirstexport_symbolsRt extra_preargstextra_postargst build_tempt target_langtruntime_librarytargstfunc((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyRCs0    Rc C`s1|dkrd}ng}x|D]}tjjtjj|\}}tjj|\}}|rw|d}n||jddgkrtd||fn|rtjj|}n|dks|dkr|j tjj ||||j q"|j tjj |||j q"W|S(NRis.rcs.ress"unknown file type '%s' (from '%s')( Rtostpathtsplitexttnormcaset splitdrivetsrc_extensionsR tbasenameRBtjoint obj_extension( R7tsource_filenamest strip_dirRIt obj_namestsrc_nametbasetexttdrv((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytobject_filenamess(  $ N(t__name__t __module__t__doc__t compiler_typeR%RRCRe(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR8s s c C`stjg}ttdr@tjtjkr@|jtjn4ttdrttjtjkrt|jtjndddg}g}x;|D]3}x*|D]"}|jtjj||qWqWdtj kr|jtjjtj ddnt tj d \}}d g}xh|D]`}|||f} t d | x9|D]1}tjj|| } tjj | rP| SqPWq%Wtd | |fdS( Nt base_prefixt real_prefixRtlibtbint SYSTEMROOTtSystem32ispython%d%d.dllsLooking for %ss%s not found in %s(tsystprefixthasattrRjRBRkRURVR\tenvironttuplet version_infotprinttexistst ValueError( tstemstsub_dirstlib_dirststemtfoldert major_versiont minor_versiontpatternstpattdllnametdll((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytfind_python_dlls, !!  $&    cC`s.tjdd|gdtj}|jjS(Ns objdump.exes-pR(R(R)R+Rt readlines(Rtst((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt dump_table s!c C`s}t|}xCtt|D]#}tj||jrPqqWtdg}xut|dt|D]Z}tj||j}|r|jt |j dj |j dfqrPqrWt|dkrt j d|nt|d}|jdtjj||jd|jd |jd x#|D]}|jd |dqPW|jd S( sGiven a dll file location, get all its exported symbols and dump them into the given def file. The .def file will be overwrittensSymbol table not foundiiisNo symbols found in %stwsLIBRARY %s s,;CODE PRELOAD MOVEABLE DISCARDABLE s;DATA PRELOAD SINGLE s EXPORTS s%s N(Rtrangetlent_STARTtmatchtdecodeRxt_TABLERBtintR/tstripRtwarntopentwriteRURVR[R-( Rtdfiletdumptitsymstjtmtdts((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt generate_def$s*   4    c`sIidd6dd6tfd}d}||pH||S(Ntamd64Rtx86tIntelc`stjjtjdd}tjj|s2dSxKtj|D]:\}}}||krB|krBtjj||SqBWdS(NtWINDIRtwinsxs(RURVR\RsRwRtwalk(tdll_namet winsxs_pathtroottdirstfiles(tarch(sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt_find_dll_in_winsxsJscS`sfx_tjgtjdjdD]=}tjj||}tjj|r!tjj|Sq!WdS(NtPATHt;( RpRqRURstsplitRVR\Rwtabspath(RRVtfilepath((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt_find_dll_in_pathTs'(R(RRR((RsS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytfind_dllEs   c C`sqtjdkrtSt}|dkr9tjdtS|dkrVtjdtSt}|rr|d7}nd|}tjj t j d|}tjj |rtjd|ft S|d }t|}|stjd |tSd |}tjj t j d|}tjd ||ft||d d|d|g} tj| } tj|| S(Ntnts?Skip building import library: Runtime is not compiled with MSVCiPs=Skip building msvcr library: custom functionality not presentRslib%s.atlibss(Skip building msvcr library: "%s" existss.dlls*Cannot build msvcr library: "%s" not founds lib%s.defs&Building msvcr library: "%s" (from %s)tdlltools-ds-l(RUtnametFalseRRRRR RVR\RpRqtisfileR*RRtinfoRR(tcalltremove( Rt msvcr_vert msvcr_nametout_nametout_filetmsvcr_dll_nametdll_filetdef_nametdef_filetcmdtretcode((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR3^sB                 cC`sVtjdkrdSt}|dkr/tS|dkrBtStd|dS(NRRRsUnhandled arch %s(RURRt_build_import_library_amd64t_build_import_library_x86Rx(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR2s   c C`sKttjd \}}dddg}tjg}ttdrhtjtjkrh|jtjn4ttdrtjtjkr|jtjnddg}g}x_|D]W}|||f}x>|D]6}x-|D]%} |jtj j || |qWqWqWx*|D]"} tj j | rt | fSqWt |d fS( sACheck if an import library for the Python runtime already exists.islibpython%d%d.aslibpython%d%d.dll.aslibpython%d.%d.dll.aRjRkRRli(RtRpRuRqRrRjRBRkRURVR\RR*R( R~RRRyRzt candidatesRtfilenametstem_dirR}tfullname((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt_check_for_import_libs(  !!    + cC`st\}}|r)tjd|dSt}tjd||fdttjd }tj j tj d|}t ||dd|d|g}t j|dS( Ns)Skip building import library: "%s" existss4Building import library (arch=AMD64): "%s" (from %s)spython%d%d.defiRRs-ds-l(RRRRRRtRpRuRURVR\RqRR(R)(t out_existsRRRRR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyRs   cC`st\}}|r)tjd|dSdttjd }tjjtj d|}tjj |st tdrtjjtj d|}n3t tdrtjjtj d|}nd}tjj |r|}qtjd |dSntjd |d d lm}d ttjd }tjjtj d|}d|j|f}|j|} |j| \} } |j| | |jt|dt} | ||f} d| }tj|}|rtjdndS(s; Build the import libraries for Mingw32-gcc on Windows s)Skip building import library: "%s" existsNspython%d%d.libiRRjRkRs+Cannot build import library: "%s" not founds(Building import library (ARCH=x86): "%s"i(tlib2defspython%d%d.defs%s %sRs3dlltool --dllname "%s" --def "%s" --output-lib "%s"s:Failed to build import library for gcc. Linking will fail.(RRRRtRpRuRURVR\RqRRrRjRkRRtnumpy.distutilsRt DEFAULT_NMtgetnmtparse_nmt output_deft DEF_HEADERRRtsystem(RRtlib_nametlib_filetbase_libRRRtnm_cmdt nm_outputtdlisttflistRRSRtstatus((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyRs> "  twin32s 8.0.50727.42t80s 9.0.21022.8t90s10.0.30319.460t100tCRT_ASSEMBLY_VERSIONt.is9Cannot import msvcrt: using manifest will not be possiblecC`siytt|d|}Wn'tk rEtd||fnXd}|i|d6|d6|d6S(sUGiven a major and minor version of the MSVCR, returns the corresponding XML file.i s)Version %d,%d of MSVCRT not supported yetsS tfullvertmajtmin(t_MSVCRVER_TO_FULLVERtstrtKeyErrorRx(RRRttemplate((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytmsvc_manifest_xml1s RcC`sH|dkrd}n%|dkr*d}ntd|d||fS(sWReturn the rc file used to generate the res file which will be embedded as manifest for given manifest file name, of given type ('dll' or 'exe'). Parameters ---------- name : str name of the manifest file to embed type : str {'dll', 'exe'} type of the binary which will embed the manifest RitexeisType %s not supporteds&#include "winuser.h" %d RT_MANIFEST %s(Rx(Rttypetrctype((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt manifest_rcQs    cC`sGt}|rC|t|ksCtdt||fqCndS(s6msver is the ms runtime version used for the MANIFEST.sKDiscrepancy between linked msvcr (%d) and the one about to be embedded (%d)N(RRRx(tmsverR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt!check_embedded_msvcr_match_linkedis  cC`s5tjj|jdgd}tjj|dS(Ntyotci(RURVR[t_gen_temp_sourcefileRW(tconfigRb((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytconfigtest_nameus!cC`s$t|}|jj}||dS(Ns .manifest(RRt exe_extension(RRtexext((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt manifest_nameys  cC`st|}|dS(Ns.rc(R(RR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytrc_names cC`st}|dk r|dkrt|t|}t||d}t||}tt|d}|jjt||j ||j qndS(Nii R( tget_build_msvc_versionRRRRRRt temp_filesRBRR-(RRtmatmitmanxmltman((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytgenerate_manifests      (GRht __future__RRRRURpR(R'tnumpy.distutils.ccompilertnumpyRuRRRtdistutils.cygwinccompilerR"tdistutils.versionRRRtdistutils.unixccompilerRtdistutils.msvccompilerRRtdistutils.errorsR R R tnumpy.distutils.misc_utilR R RRRR#t get_msvcrtcompileRRR$RRRRRRR3R2RRRRtplatformtmsvcrtRrRRtmajortminortrestt ImportErrorRRRRRRRR(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt sd      "   &  !  ; $  ?