ó =ã¾Rc@s»ddlZddlZddlZdad„Zd„ZejdƒZejdƒZ ejdƒZ d„Z d„Z ejd ƒZ d „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((su/home/kou/work/ruby/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 ((su/home/kou/work/ruby/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((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytto_underscores8scCs(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((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytto_underscores_noprefixEssdlname='([A-z0-9\.\-\+]+)' cCsMt|ƒ}|jƒ}|jƒtj|ƒ}|rE|jƒdSdSdS(Ni(topentreadtcloset _libtool_pattsearchtgroupsR(tla_filetftdatatm((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt_extract_dlname_fieldPs   cCs,t|ƒ}|dkrdStjj|ƒS(N(R!RRtpathtbasename(Rtdlname((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytextract_libtool_shlib]s  cCset|ƒ}|dkr+td|ƒ‚ntjjtjj|ƒd|ƒ}|jddƒ}|S(Ns'%s has no dlname. Not a shared library?s.libss .libs/.libs(R!Rt ValueErrorRR"tjointdirnametreplace(RR$tlibname((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytextract_libtoolgs   cCs{|j }|sdS|j}|r0|jdƒSy&tjddgdttjƒƒWntj t fk rsdSXdgS(Nt tlibtools --versiontstdout( t nolibtoolRt libtool_pathRt subprocesst check_callRRtdevnulltCalledProcessErrortOSError(toptionstlibtool_infectionR0((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytget_libtool_commandus   cCs‘t|ƒ}t|ƒ}|jdƒ}|jdƒ}x:||krr|dkrr|jdƒ}|jdƒ}q9W|jƒ|jƒ||kS(Ni R(RRR(tpath1tpath2tf1tf2tbuf1tbuf2((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pytfiles_are_identicalŒs    (treRR1RRR RtcompileRRRRRRR!R%R+R8R?(((su/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyts