mò &U²Ic@sÎdZdZdkZdkZdkZdklZlZdkl Z dk l Z dk l Z lZlZdklZde fd „ƒYZd efd „ƒYZd Zd ZdZd„Zd„ZdS(sdistutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). s;$Id: cygwinccompiler.py 37828 2004-11-10 22:23:15Z loewis $N(sgen_preprocess_optionssgen_lib_options(s UnixCCompiler(s write_file(sDistutilsExecErrors CompileErrorsUnknownFileError(slogtCygwinCCompilerc BsƒtZdZdZdZdZdZdZdZdddd „Z d „Z ddddddddddd „ Z dd d „Z RS(Ntcygwins.os.as.dllslib%s%ss%s%ss.exeic CsÍti||||ƒtƒ\}}|i d||fƒ|t j o|i d|ƒnt ƒ\|_ |_|_|i |id|i |i|ifƒ|idjo d|_n d|_|idjo d}nd }|id d d d dddddd|i|fƒ|i djodg|_|i dƒng|_tiidƒ}|djoVti|d|d!}|djodg|_qÉ|djodg|_qÉndS(Ns%Python's GCC status: %s (details: %s)sƒPython's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.s: gcc %s, ld %s, dllwrap %s s2.10.90tgcctdllwraps2.13s-shareds -mdll -statictcompilersgcc -mcygwin -O -Wallt compiler_sosgcc -mcygwin -mdll -O -Wallt compiler_cxxsg++ -mcygwin -O -Wallt linker_exes gcc -mcygwint linker_sos%s -mcygwin %ss2.91.57tmsvcrts,Consider upgrading to a newer version of gccsMSC v.iÿÿÿÿii t1300tmsvcr70t1310tmsvcr71(t UnixCCompilert__init__tselftverbosetdry_runtforcetcheck_config_htstatustdetailst debug_printt CONFIG_H_OKtwarnt get_versionst gcc_versiont ld_versiontdllwrap_versiont compiler_typet linker_dllt shared_optiontset_executablest dll_librariestsystversiontfindtmsc_postmsc_ver( RRRRRR&RR R'((t6/data/zmath/lib/python2.4/distutils/cygwinccompiler.pyREs: *          cCs­|djp |djoEy |idd|d|gƒWq©tj o}t|‚q©XnKy)|i|i||d|g|ƒWntj o}t|‚nXdS(Ns.rcs.restwindress-is-o( textRtspawntsrctobjtDistutilsExecErrortmsgt CompileErrorRtcc_argstextra_postargs(RR-R,R*R1R2tpp_optsR/((R(t_compileŒs )cCsáti| pgƒ} ti|pgƒ}ti|pgƒ}|i|iƒ|dj o2||i jp|i djot i i|dƒ}t i it i i|ƒƒ\}}t i i||dƒ}t i i|d|dƒ}dt i i|ƒdg}x|D]}|i|ƒqW|it||fd|ƒ|i d jo*| id |gƒ| id |gƒq‘|i|ƒn| p| id ƒnti||||||||d| | | | | ƒdS( NRis.deftlibs.as LIBRARY %stEXPORTSs writing %sRs --output-libs--defs-s(&tcopyt extra_preargst librariestobjectstextendRR"texport_symbolstNonet target_desct EXECUTABLERtostpathtdirnamettemp_dirtsplitexttbasenametoutput_filenametdll_namet dll_extensiontjointdef_filetlib_filetcontentstsymtappendtexecutet write_filetdebugRtlinkt output_dirt library_dirstruntime_library_dirsR2t build_tempt target_lang(RR>R:RFRSR9RTRUR<RQR8R2RVRWRGRHRLRCRKRMRJ((R(RRšsF- $   tcCs |djo d}ng}xè|D]à}tiitii|ƒƒ\}}||i ddgjot d||f‚n|otii|ƒ}n|djp |djo+|itii||||iƒƒq$|itii|||iƒƒq$W|S(NRXs.rcs.ress"unknown file type '%s' (from '%s')(RSR=t obj_namestsource_filenamestsrc_nameR@RARDtnormcasetbaseR*Rtsrc_extensionstUnknownFileErrort strip_dirRERNRIt obj_extension(RRZR`RSRYR*R]R[((R(tobject_filenamesýs  $(t__name__t __module__RRatstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt exe_extensionRR4R=RRRb(((R(R;sG 'ctMingw32CCompilercBs tZdZdddd„ZRS(Ntmingw32icCsti||||ƒ|idjo d}nd}|idjo d}nd}|i ddd d d d d ddd|i ||fƒg|_ t iidƒ}|djoVt i|d|d!}|djodg|_ q |djodg|_ q ndS(Ns2.13s-shareds -mdll -statics2.91.57s--entry _DllMain@12RXRsgcc -mno-cygwin -O -WallRsgcc -mno-cygwin -mdll -O -WallRsg++ -mno-cygwin -O -WallRsgcc -mno-cygwinRs%s -mno-cygwin %s %ssMSC v.iÿÿÿÿii R R R R (RRRRRRRR Rt entry_pointR!RR"R#R$R%R&R'(RRRRR R&RlR'((R(Rs(       (RcRdRR(((R(Rjstoksnot okt uncertaincCsÞdkl}dk}|itidƒdjotdfSn|iƒ}y&t |ƒ}|i ƒ}|i ƒWn,tj o }td||iffSn;X|i|dƒdjotd|fSntd |fSdS( s¡Check if the current Python installation (specifically, pyconfig.h) appears amenable to building extensions with GCC. Returns a tuple (status, details), where 'status' is one of the following constants: CONFIG_H_OK all is well, go ahead and compile CONFIG_H_NOTOK doesn't look good CONFIG_H_UNCERTAIN not sure -- unable to read pyconfig.h 'details' is a human-readable string explaining the situation. Note there are two ways to conclude "OK": either 'sys.version' contains the string "GCC" (implying that this Python was built with GCC), or the installed "pyconfig.h" contains the string "__GNUC__". (s sysconfigNtGCCissys.version mentions 'GCC'scouldn't read '%s': %st__GNUC__s'%s' mentions '__GNUC__'s '%s' does not mention '__GNUC__'(t distutilst sysconfigtstringR%R#R$Rtget_config_h_filenametfntopentftreadtstclosetIOErrortexctCONFIG_H_UNCERTAINtstrerrortCONFIG_H_NOTOK(RsRwRrRyRuR|((R(RZs     c Cs³dkl}dkl}dk}|dƒ}|ohti|ddƒ} | i ƒ} | i ƒ|i d| ƒ}|o||idƒƒ}q¤d}nd}|d ƒ}|ohti|d dƒ} | i ƒ} | i ƒ|i d| ƒ}|o||idƒƒ}q%d}nd}|d ƒ}|ohti|d dƒ} | i ƒ} | i ƒ|i d | ƒ}|o||idƒƒ} q¦d} nd} ||| fS(sj Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. (s StrictVersion(sfind_executableNRs -dumpversiontrs(\d+\.\d+(\.\d+)*)itlds -vRs --versions (\d+\.\d+(\.\d+)*)(tdistutils.versiont StrictVersiontdistutils.spawntfind_executabletretgcc_exeR@tpopentoutRxt out_stringRztsearchtresulttgroupRR=tld_exeRt dllwrap_exeR( R…RRRƒR†R‡RŒRŽRRRŠR‰((R(RsF               (t__doc__t __revision__R@R#R7tdistutils.ccompilertgen_preprocess_optionstgen_lib_optionstdistutils.unixccompilerRtdistutils.file_utilRPtdistutils.errorsR.R0R_RqtlogRRjRRR}RR(R‘R.R˜R“RjRR”RRRR#RR}R0RPR7R@R_R((R(t?s+   à; 3