Ñò [ÐKc@s<dZddkZddkZddklZddklZddklZddk l Z l Z l Z ddk lZddklZdd klZdd klZdd klZlZlZlZlZlZlZlZdd klZye Wn#e!j odd k"l#Z nXdefd„ƒYZdS(sB Modified version of build_ext that handles fortran source files. iÿÿÿÿN(tglob(t newer_group(t build_ext(tDistutilsFileErrortDistutilsSetupErrortDistutilsError(t copy_file(tlog(t exec_command(t combine_paths(tfilter_sourcest has_f_sourcesthas_cxx_sourcestget_ext_source_filestget_numpy_include_dirst is_sequencetget_build_architecturet msvc_version(tshow_fortran_compilers(tSetRcBs‹eZdZeidgZeidddefgZd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „ZRS(s:build C/C++/F extensions (compile/link to build directory)s fcompiler=s!specify the Fortran compiler typeshelp-fcompilers list available Fortran compilerscCsti|ƒd|_dS(N(t old_build_exttinitialize_optionstNonet fcompiler(tself((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyR*s cCsH|i}ti|ƒ|dj o!|ii|iipgƒndS(N(t include_dirsRtfinalize_optionsRtextendt distribution(Rt incl_dirs((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyR.s   cCsq|ipdS|idƒ|iiƒo¹|io||iiidƒo#tidƒ|ii dƒ}qÎ|ii dƒ}d|_|i ƒ|i ƒd|iidextension %r has Fortran sources but no Fortran compiler foundsTextension %r has Fortran libraries but no Fortran linker found, using default linkersc++sLextension %r has C++ libraries but no C++ linker found, using default linkertdependsscompiling C sourcest output_dirR(Rtdebugtextra_postargsscompiling C++ sourcess#compiling Fortran 90 module sourcess*.modsfailed to move %r to %rscompiling Fortran sourcesis2.3t target_langR&R'truntime_library_dirstexport_symbolst build_temp(sf77sf90(sf77sf90(=RGRRRREtlisttget_ext_fullnameR4tsplittjoinR;tget_package_dirtostpathtget_ext_filenamet build_libRlR%RRRnRDtextra_compile_argsRFt undef_macrosR<R R"RORHRRRNRKRR7RsRRtcompilet module_dirstdirnametmkpathtmodule_dir_switchRtmodule_optionstabspathtisfiletremovet move_fileRt extra_objectsRtextra_link_argst get_librariesR'tlink_shared_objectt_libs_with_msvc_and_fortrantsystversionRqtget_export_symbols(#RRYRGtfullnametmodpathtpackagetbaseRit package_dirt ext_filenameRlt extra_argsR(tundeft c_sourcest cxx_sourcest f_sourcestfmodule_sourcesRRLtkwsRmRt c_objectsRot f_objectsR€tmodule_build_dirtexisting_modulestftttobjectsR&R'tlinker((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pytbuild_extensionôs                                %             cCsw|idƒi}|idƒi}|iitii|dƒgd|iƒ}|ii |dd|d|i ƒdS(NRRsgfortran_vs2003_hack.cRmt_gfortran_workaroundRn( R;RRR"RRyRzRwRstcreate_static_libRn(RR™RRR¤((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyt_add_dummy_mingwex_sym¨s   c Csš|djodSxH|D]@}|idƒoqnt}xL|pgD]=}tii|d|ƒ}tii|ƒo t}PqJqJW|oqnt}x’|D]Š}tii|d|ƒ}tii|ƒoXtii|i|dƒ}t ||ƒ|i|jo|i |iƒnt}Pq¦q¦W|oqnt i d||fƒqWg} xd|i D]Y} | idƒo6tdd| gd tƒ\} } | p | } q¹n| i | ƒqmW|i| ƒx¼|iD]±} | idƒp›|i | ƒt| d | d ƒ}|oltii|i| dƒ}tii|ƒpt |d |ƒn|i|jo|i |iƒqŽq’qáqáWdS( NRks%s.libslib%s.as.libs+could not find library %r in directories %ss/usr/libtcygpaths-wtuse_teetlibs.ai(Rt startswithRMRyRzRwR†RQRsRR<RR7R'RRR&R (RRt c_librariestc_library_dirsRVt fileexiststlibdirtlibfiletlibfile2t f_lib_dirstdirtstoR¬tptdst_name((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyR°sd      !   cCsA|i|iƒg}x$|iD]}|it|ƒƒq W|S(N(tcheck_extensions_listR1RR (Rt filenamesRY((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pytget_source_filesæs  cCsy|i|iƒg}x\|iD]Q}|ipq n|i|iƒ}|itii|i |i |ƒƒƒq W|S(N( RºR1RGRuRER<RyRzRwR|R{(RtoutputsRYR‘((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyt get_outputsís  N(s fcompiler=Ns!specify the Fortran compiler type(t__name__t __module__t descriptionRt user_optionsRt help_optionsRRRR:RgR¦R©RR¼R¾(((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyRs       ¼  ´  6 ($t__doc__RyRŽRtdistutils.dep_utilRtdistutils.command.build_extRRtdistutils.errorsRRRtdistutils.file_utilRtnumpy.distutilsRtnumpy.distutils.exec_commandRtnumpy.distutils.system_infoR tnumpy.distutils.misc_utilR R R R RRRRt'numpy.distutils.command.config_compilerRRBt NameErrortsetsR(((sG/usr/lib64/python2.6/site-packages/numpy/distutils/command/build_ext.pyts"  :