ó ™Tc@sñddlZddlZddlZddlZdad„Zd„ZejdƒZ ejdƒZ ejdƒZ d„Z d„Z ejd ƒZd „Zejd ƒZd „Zd „Zd„Zd„Zd„Zd„Zd„ZdS(iÿÿÿÿNcCsStdkrItjjddƒjdƒadtkrItjdƒqIn|tkS(s(Check for whether a specific debugging feature is enabled. Well-known flags: * start: Drop into debugger just after processing arguments * exception: Drop into debugger on fatalexception * warning: Drop into debugger on warning * posttrans: Drop into debugger just before introspectable pass tGI_SCANNER_DEBUGtt,N(t _debugflagstNonetostenvirontgettsplittremove(tflag((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pythave_debug_flags  cCs)t|ƒr%ddl}|jƒndS(Niÿÿÿÿ(R tpdbt set_trace(R R ((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytbreak_on_debug_flag.s  s([^A-Z])([A-Z])s([A-Z][A-Z])([A-Z][0-9a-z])s^([A-Z])([A-Z])cCs@tjd|ƒ}tjd|ƒ}tjd|ddƒ}|S(sJConverts a typename to the equivalent underscores name. This is used to form the type conversion macros and enum/flag name variables. In particular, and differently from to_underscores_noprefix(), this function treats the first character differently if it is uppercase and followed by another uppercase letter.s\1_\2tcounti(t_upperstr_pat1tsubt_upperstr_pat2t_upperstr_pat3(tname((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytto_underscores9scCs(tjd|ƒ}tjd|ƒ}|S(ssLike to_underscores, but designed for "unprefixed" names. to_underscores("DBusFoo") => dbus_foo, not d_bus_foo.s\1_\2(RRR(R((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytto_underscores_noprefixFssdlname='([A-z0-9\.\-\+]+)' cCsMt|ƒ}|jƒ}|jƒtj|ƒ}|rE|jƒdSdSdS(Ni(topentreadtcloset _libtool_pattsearchtgroupsR(tla_filetftdatatm((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt_extract_dlname_fieldQs   slibdir='([^']+)'cCsMt|ƒ}|jƒ}|jƒtj|ƒ}|rE|jƒdSdSdS(Ni(RRRt_libtool_libdir_patRRR(RRRR ((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt_extract_libdir_field_s   cCsxt|ƒ}|dkrdStjƒdkrhtjj|ƒ}t|ƒ}|dkr\|S|d|Stjj|ƒS(NtDarwint/(R!RtplatformtsystemRtpathtbasenameR#(Rtdlnamet dlbasenametlibdir((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytextract_libtool_shlibls     cCsqt|ƒ}|dkr+td|ƒ‚ntjjtjj|ƒd|ƒ}|jddƒjddƒ}|S(Ns'%s has no dlname. Not a shared library?s.libss .libs/.libss .libs\.libs(R!Rt ValueErrorRR(tjointdirnametreplace(RR*tlibname((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytextract_libtool~s   cCsœ|j }|sdS|j}|r0|jdƒSd}tjƒdkrQd}ny&tj|dgdtt j ƒƒWntj t fk r”dSX|gS(Nt tlibtoolR$tglibtools --versiontstdout( t nolibtoolRt libtool_pathRR&R't subprocesst check_callRRtdevnulltCalledProcessErrortOSError(toptionstlibtool_infectionR9t libtool_cmd((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytget_libtool_commandŒs    cCs‘t|ƒ}t|ƒ}|jdƒ}|jdƒ}x:||krr|dkrr|jdƒ}|jdƒ}q9W|jƒ|jƒ||kS(Ni R(RRR(tpath1tpath2tf1tf2tbuf1tbuf2((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytfiles_are_identical§s    cCs+|jdƒs|Sdtjj|dƒS(Ns-Ii(t startswithRR(trealpath(tcflag((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytcflag_real_include_path´scCsåd„}d„}tjj|ƒ\}}|rf||ƒr@|Stjdkrá||ƒrá|dSn{xxtjdjtjƒD]]}|jdƒ}tjj||ƒ}||ƒrº|Stjdkr€||ƒr€|dSq€WdS(NcSs%tjj|ƒo$tj|tjƒS(N(RR(tisfiletaccesstX_OK(tfpath((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytis_exe¼scSsC|jƒjdƒ oBtjj|dƒoBtj|dtjƒS(Ns.exe(tlowertendswithRR(RNRORP(RQ((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt is_nt_exe¿stnts.exetPATHt"( RR(RRRtpathseptstripR/R(tprogramRRRURQtfnameR(texe_file((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytwhich»s        (treRR:R&RRR RtcompileRRRRRRR!R"R#R-R3RBRIRMR^(((so/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyts*