ž 7’ReΟ c@snddlZddlmZddlmZddlmZGdd„deƒZdd„Zd d „Z dS( iN(uCommand(ulogger(u pkg_resourcescsJ|EeZdZdZdZdZdZ‡fdd†Zdd„Z‡S( u ShowCommandu6Show information about one or more installed packages.ushowu$ %prog [options] ...u*Show information about installed packages.c s^tt|ƒj||Ž|jjdddddddd dd ƒ|jjd |jƒdS( Nu-fu--filesudestufilesuactionu store_trueudefaultuhelpu7Show the full list of installed files for each package.iF(usuperu ShowCommandu__init__ucmd_optsu add_optionuFalseuparseruinsert_option_group(uselfuargsukw(u __class__(u*/tmp/pip-zej_zi-build/pip/commands/show.pyu__init__s  uShowCommand.__init__cCs=|stjdƒdS|}t|ƒ}t||jƒdS(Nu.ERROR: Please provide a package name or names.(uloggeruwarnusearch_packages_infou print_resultsufiles(uselfuoptionsuargsuqueryuresults((u*/tmp/pip-zej_zi-build/pip/commands/show.pyuruns   uShowCommand.run( u__name__u __module__u __qualname__u__doc__unameuusageusummaryu__init__urun(u __locals__((u __class__u*/tmp/pip-zej_zi-build/pip/commands/show.pyu ShowCommands  u ShowCommandccsέtdd„tjDƒƒ}xΊ|D]²}|jƒ}||kr#||}i|jd6|jd6|jd6dd„|jƒDƒd6}tj j |j|j ƒdd ƒ}tj j |ƒrΝ||d ,s u(search_packages_info..unameuversionulocationcSsg|]}|j‘qS((u project_name(u.0udep((u*/tmp/pip-zej_zi-build/pip/commands/show.pyu 5s urequiresu .egg-infouinstalled-files.txtufilesN( udictu pkg_resourcesu working_setuloweru project_nameuversionulocationurequiresuosupathujoinuegg_nameuisfile(uqueryuinstalled_packagesunameunormalized_nameudistupackageufilelist((u*/tmp/pip-zej_zi-build/pip/commands/show.pyusearch_packages_info$s$           usearch_packages_infocCsγ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(uD Print the informations from installed distributions found. u---uName: %sunameu Version: %suversionu Location: %sulocationu Requires: %su, urequiresuFiles:ufilesu %su!Cannot locate installed-files.txtN(uloggerunotifyujoinuopenustrip(u distributionsulist_all_filesudistuline((u*/tmp/pip-zej_zi-build/pip/commands/show.pyu print_results@s    u print_results( uosupip.basecommanduCommandupip.loguloggeru pip._vendoru pkg_resourcesu ShowCommandusearch_packages_infou print_results(((u*/tmp/pip-zej_zi-build/pip/commands/show.pyus