î œ0{YÏ ã@snddlZddlmZddlmZddlmZGdd„deƒZdd„Zd d „Z dS) éN)ÚCommand)Úlogger)Ú pkg_resourcescsFeZdZdZdZdZdZ‡fdd†Zdd„Z‡S) Ú ShowCommandz6Show information about one or more installed packages.Úshowz$ %prog [options] ...z*Show information about installed packages.c s^tt|ƒj||Ž|jjddddddddd d ƒ|jjd |jƒdS) Nz-fz--filesÚdestÚfilesÚactionÚ store_trueÚdefaultFÚhelpz7Show the full list of installed files for each package.r)ÚsuperrÚ__init__Úcmd_optsÚ add_optionÚparserÚinsert_option_group)ÚselfÚargsÚkw)Ú __class__©ú,/tmp/pip-ok8sy_ze-build/pip/commands/show.pyrs  zShowCommand.__init__cCs=|stjdƒdS|}t|ƒ}t||jƒdS)Nz.ERROR: Please provide a package name or names.)rÚwarnÚsearch_packages_infoÚ print_resultsr)rÚoptionsrÚqueryÚresultsrrrÚruns   zShowCommand.run) Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚnameÚusageÚsummaryrrrr)rrrs  rccsÝtdd„tjDƒƒ}xº|D]²}|jƒ}||kr#||}i|jd6|jd6|jd6dd„|jƒDƒd6}tj j |j|j ƒdd ƒ}tj j |ƒrÍ||d ,s z(search_packages_info..r$ÚversionÚlocationcSsg|]}|j‘qSr)r')r)Údeprrrr+5s Úrequiresz .egg-infozinstalled-files.txtrN) ÚdictrÚ working_setr(r'r,r-r/ÚosÚpathÚjoinÚegg_nameÚisfile)rÚinstalled_packagesr$Únormalized_nameÚdistÚpackageÚfilelistrrrr$s$           rcCsãxÜ|D]Ô}tjdƒtjd|dƒtjd|dƒtjd|dƒtjdd j|d ƒƒ|rtjd ƒd |krËx?t|d ƒD]}tjd |jƒƒq§WqÛtjdƒqqWdS)zD Print the informations from installed distributions found. z---zName: %sr$z Version: %sr,z Location: %sr-z Requires: %sz, r/zFiles:rz %sz!Cannot locate installed-files.txtN)rÚnotifyr4ÚopenÚstrip)Ú distributionsÚlist_all_filesr9Úlinerrrr@s    r) r2Úpip.basecommandrÚpip.logrÚ pip._vendorrrrrrrrrÚs