Ñò 9ÕÒTc @@s™ddklZddkZddkZddklZddklZlZddk l Z ei e ƒZ defd„ƒYZd„Zd „ZdS( i(tabsolute_importN(tCommand(tSUCCESStERROR(t pkg_resourcest ShowCommandcB@s2eZdZdZdZdZd„Zd„ZRS(s6Show information about one or more installed packages.tshows$ %prog [options] ...s*Show information about installed packages.c O@s^tt|ƒi||Ž|iidddddddtdd ƒ|iid |iƒdS( Ns-fs--filestdesttfilestactiont store_truetdefaultthelps7Show the full list of installed files for each package.i(tsuperRt__init__tcmd_optst add_optiontFalsetparsertinsert_option_group(tselftargstkw((s7/usr/lib/python2.6/vendor-packages/pip/commands/show.pyRs  cC@sG|ptidƒtS|}t|ƒ}t||iƒptStS(Ns.ERROR: Please provide a package name or names.(tloggertwarningRtsearch_packages_infot print_resultsRR(RtoptionsRtquerytresults((s7/usr/lib/python2.6/vendor-packages/pip/commands/show.pytrun s  (t__name__t __module__t__doc__tnametusagetsummaryRR(((s7/usr/lib/python2.6/vendor-packages/pip/commands/show.pyRs  cc@smtg}tiD]}||iiƒ|fq~ƒ}g}|D]}||iƒqD~}xg}|D]"}||jo|||qnqn~D]Î} h| id6| id6| id6g} | iƒD]} | | iqÏ~ d6} d } t | ti ƒo»| i dƒo§| i dƒ}g}|D]}||i dƒdq/~}g}|D]}|tii| i|ƒq]~}g}|D]}|tii|| iƒq~} qInŠ| i dƒoy| i dƒ}g}|D]}|tii| i|ƒqê~}g}|D]}|tii|| iƒq~} n| o t| ƒ| d <| Vq—Wd S( sî Gather details from installed distributions. Print distribution name, version, location, and installed files. Installed files requires a pip generated 'installed-files.txt' in the distributions '.egg-info' directory. R"tversiontlocationtrequirestRECORDt,isinstalled-files.txtRN(tdictRt working_sett project_nametlowerR%R&R'tNonet isinstancetDistInfoDistributiont has_metadatatget_metadata_linestsplittostpathtjointrelpathtegg_infotsorted(Rt_[1]tpt installedt_[2]R"t query_namest_[3]tpkgtdistt_[4]tdeptpackaget file_listtlinest_[5]tltpathst_[6]t_[7]t_[8]t_[9]((s7/usr/lib/python2.6/vendor-packages/pip/commands/show.pyR,s.6'7   ..3;37cC@sñt}xä|D]Ü}t}tidƒtid|dƒtid|dƒtid|dƒtidd i|d ƒƒ|o_tid ƒ|d dj o0x:|d D]}tid |iƒƒq³Wqétidƒq q W|S(sD Print the informations from installed distributions found. s---sName: %sR"s Version: %sR%s Location: %sR&s Requires: %ss, R'sFiles:Rs %ss!Cannot locate installed-files.txtN(RtTrueRtinfoR6R.tstrip(t distributionstlist_all_filestresults_printedRAtline((s7/usr/lib/python2.6/vendor-packages/pip/commands/show.pyRQs"   (t __future__RtloggingR4tpip.basecommandRtpip.status_codesRRt pip._vendorRt getLoggerRRRRR(((s7/usr/lib/python2.6/vendor-packages/pip/commands/show.pyts   %