ó ™a[c@s¼ddlZddlZddlZddd„ƒYZejdd„Zd„Zed„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„ZdS(iÿÿÿÿNtColorcBs,eZdZdZdZdZdZdZRS(sANSI Terminal colorssssss(t__name__t __module__t__doc__tGREENtBLUEtYELLOWtREDtEND(((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyRs tMESSAGEcCshtjtjjƒƒr<djd|d|dtjƒ}n|}tjjdjd|d|ƒƒdS(s"Print a string with a color prefixs{start}{prefix}{end}tstarttprefixtends{prefix}: {msg} tmsgN( tostisattytsyststderrtfilenotformatRRtwrite(R tcolorR t real_prefix((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt print_color#s$cCs*t|dtjddƒtjdƒdS(sPrint an error, and terminateRR tERRORiN(RRRRtexit(R ((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt print_error+scCsQ|rtj}d}ntj}d}t|||ƒ|rMtjdƒndS(s)Print a warning, and optionally terminateRtWARNINGiN(RRRRRR(R tfatalRR ((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt print_warning0s   cCst|dtjddƒdS(sPrint a messageRR tINFON(RRR(R ((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt print_info<scCs_d}t}xL|D]D}|dkr.t}q|rM||jƒ7}t}q||7}qW|S(Ntt.(tFalsetTruetupper(tstrett force_uppertc((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt strip_dots@s    cCs|jddƒS(NR!t-(treplace(R%((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pytdots_to_hyphensNscCs¨d}t}t}t}x‰|D]}|rG|dkrG|d7}qnt}|jƒrq|rht}nt}nt}|rŠ|d7}n||jƒ7}t}qW|S(NR t_(R"R#tisuppertlower(R%R&t insert_uscoretprev_was_lowertinitialR(((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pytcamel_case_to_uscoreQs&       cCs#|r|jdƒdkrtStS(NR-i(tfindR#R"(R%((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt is_ugly_caseiscCs4|r0x'|D]}|j|kr |jSq WndS(N(tkeytvaluetNone(t annotationsR6ta((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pytlookup_annotationns  cCs't|dƒ}|dkrdS|SdS(Nsorg.gtk.GDBus.DocStringR (R;R8(R9R%((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt lookup_docsus cCs't|dƒ}|dkrdS|SdS(Nsorg.gtk.GDBus.SinceR (R;R8(R9R%((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyt lookup_since|s cCs't|dƒ}|dkrdS|SdS(Nsorg.gtk.GDBus.DocString.ShortR (R;R8(R9R%((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pytlookup_brief_docsƒs cCsV|ddkrd}n#|dr6t|dƒ}nd}tjj|ƒ|dfS(Nit UNRELEASEDt9999t0i(tstrt distutilstversiont LooseVersion(R6tv((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pytversion_cmp_keyŠs   ((tdistutils.versionRCRRRRRRR"RRR)R,R3R5R;R<R=R>RG(((sL/home/vagrant/ruby-gnome2/glib2/vendor/local/share/glib-2.0/codegen/utils.pyts