Ñò ‚Ic @sôddkZddkZddkZddklZlZddkZddkZddkZddk l Z ddk Z ddk Z defd„ƒYZ defd„ƒYZdefd „ƒYZd „Zd „Zd efd „ƒYZdS(iÿÿÿÿN(tCommandt BadCommand(tStringIOtEntryPointCommandc BsøeZdZdZdZdZeideƒZ e i ddddd d d d ƒe i d dddd dƒe i dddd d d dƒd„Z d„Z d„Z dd„Zd d„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(!t ENTRY_POINTs#Show information about entry pointsss Shows information about one or many entry points (you can use wildcards for entry point names). Entry points are used for Egg plugins, and are named resources -- like an application, template plugin, or other resource. Entry points have a [group] which defines what kind of object they describe, and inside groups each entry point is named. itverboses--lists-ltdesttlist_entry_pointstactiont store_truethelps0List all the kinds of entry points on the systems--eggs-etshow_eggs+Show all the entry points for the given Eggs--regext use_regexsEMake pattern match as regular expression, not just a wildcard patterncCs-|iio |iƒS|iio|i|iiƒS|iptdƒ‚n|i|idƒ}|i|ƒ}|ptd|idƒ‚nd}t|iƒdjo|i|idƒ}nxV|D]N}|i |ƒ}d|GH|o|i |ƒGHHnh}|i ||ƒq×WdS(Ns(You must give an entry point (or --list)isNo group matched %sis[%s]( toptionsRR targsRt get_patterntget_groups_by_patterntNonetlentget_group_descriptiontwraptprint_entry_points_by_group(tselftpatterntgroupstep_pattgrouptdesctby_dist((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pytcommand+s,     c Cs]tiƒ}t|ƒ}|iƒx4|D],}t||ƒ}|d}|i|ƒiƒ}|o<g} |D]$} |i| iƒo | | qpqp~ }n|pq)nt|ƒdjod|t|ƒdfGHn d|GH|id„ƒxZ|D]R} |i | ƒGH|i | |ƒ} | o%| i o|i | i ddƒGHqÿqÿWq)WdS(Niis%s (+ %i older versions)s%scSst|i|iƒS((tcmptname(tatb((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pytUstindenti( t pkg_resourcest Environmenttlisttsortt get_entry_maptvaluestsearchRRt_ep_descriptiontget_entry_point_descriptiont descriptionR( RRRtenvt project_namest project_nametdiststdisttentriest_[1]tetentryR((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRBs0    + c CsŽd}|io|i|idƒ}nd}t|iƒdjo|i|idƒ}n|idƒo|d}nti|ƒ}|iƒ}|iƒ}|i ƒxØ|D]Ð\}}|o|i |ƒ oq¶nd|GH|iƒ}|i ƒxƒ|D]{\} } |o|i | ƒpqq5n|i | ƒGH|i | |ƒ} | o%| i o|i| i ddƒGHnHqWq¶WdS(Niisegg:is[%s]R#i(RRRRt startswithR$tget_distributionR(titemsR'R*R+R,R-R( Rtegg_namet group_patRR2t entry_mapt entry_groupsRtpointsRR6R((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR \s:          ic Cst|ƒ}ttiiddƒƒ|}dig}|iƒD]}||iƒqB~ƒ}|idƒ}g}xM|D]E}|i ƒ|jodit i ||ƒƒ}n|i |ƒq}Wdi|ƒ}g} |iƒD]}| d||qæ~ } di| ƒS(NtCOLUMNSiFs s t ( tdedenttinttostenvirontgettjoint splitlinestrstriptsplittlstripttextwrapRtappend( RttextR#twidthR4tlinetparast new_parastparat_[2]tlines((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRys 6(cCsq|i}|dj o|d|t|ƒ}n|i}|io|ddi|iƒ}nd||fS(NR@t:t.s%s = %s(RRRt module_nametattrsRF(Rteptpad_nameRR((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR+‰s    cCsG|pdS|iioti|ƒStiti|ƒtiƒSdS(N(RR R tretcompiletfnmatcht translatetI(Rts((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR’s  cCs§|i|io |idƒ}|i|ƒ}dt|ƒGHxb|D]Z}|i|ƒ}d|GH|o5t|dƒo |i}n|i|ddƒGHqEqEWdS(Nis%i entry point groups found:s[%s]R-R#i(RRRRRthasattrR-R(RRRRR((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRšs   cCs´tiƒ}h}x…|D]}}xt||D]h}x_ti|ƒD]N}|o|i|ƒ oq@n| o|idƒoq@nd||tj o2}tƒ}tid|ƒt||iƒƒSXdS(Ntfile(t!_safe_get_entry_point_descriptiont ExceptionRt tracebackt print_exctErrorDescriptiontgetvalue(RRYRR5tout((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR,Às  cCs™|iiƒd|}|ii||iƒ}|pStti|dƒƒ}|pt|iƒƒS|diƒ}|||ƒ}n |iƒ}|S(Nspaste.description.tgenerici( R2tactivatetget_entry_infoRR&R$Rdt super_genericRe(RRYRt meta_grouptmetaRntobjR((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRgÈs    N(t__name__t __module__tusagetsummaryR-tmax_argsRtstandard_parsertFalsetparsert add_optionRRR RRR+RRRRR,Rg(((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRs6         tEntryPointDescriptioncBseZd„ZRS(cCs ||_dS(N(R(RR((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyt__init__Ús(RuRvR(((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR~Øst SuperGenericcBseZd„ZRS(cCs'||_t|iiƒ|_y±t|ittifƒo|iii }nDt |idƒo't|iti ƒ o|ii }n |i}t |dƒo |i }nti|ƒ}ti|Œ}Wntj o d}nX|o1|iod||if|_q#||_ndS(Nt__call__t __paste_sig__s%s %s(t doc_objectRAt__doc__R-t isinstancettypettypest ClassTypeRtim_funcRat FunctionTypeRR‚tinspectt getargspect formatargspect TypeErrorR(RRƒtfunctsig((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRâs(     (RuRvR(((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR€àscCs7|djo|S|idƒidƒ}ti|ƒS(Ns s (RtstripRKRA(R`((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRAûs cCst|ƒ}|ipdS|S(N(R€R-R(RtR((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRqs  RkcBseZd„ZRS(cCs,||_di|ƒ|_d||_dS(Ns sError loading: %s(texcRFttbR-(RR’R“((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyR s (RuRvR(((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyRks(RKRCR$RRRR]R[Rit cStringIORR‹R‡RtobjectR~R€RARqRk(((s</usr/lib/python2.6/site-packages/paste/script/entrypoints.pyts        Ê