From cca99ceb3c501c0d69440b608e558362fac2dab3 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 14 Feb 2006 20:54:34 +0000 Subject: Minor tweak to installation report, and add in a hook for later displaying the "extras" that can be added to a package. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042363 --- setuptools/command/easy_install.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 406e48ae..2287c1b7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -496,7 +496,7 @@ Please make the appropriate changes for your system and try again. self.local_index.add(dist) self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist - log.warn(self.installation_report(dist, *info)) + log.warn(self.installation_report(requirement, dist, *info)) if not deps and not self.always_copy: return elif requirement is not None and dist.key != requirement.key: @@ -859,10 +859,9 @@ you ignore the conflicts, the installed package(s) may not work. if not self.ignore_conflicts_at_my_risk: raise DistutilsError("Installation aborted due to conflicts") - def installation_report(self, dist, what="Installed"): + def installation_report(self, req, dist, what="Installed"): """Helpful installation message for display to package users""" - - msg = "\n%(what)s %(eggloc)s" + msg = "\n%(what)s %(eggloc)s%(extras)s" if self.multi_version: msg += """ @@ -875,8 +874,8 @@ similar to one of these examples, in order to select the desired version: pkg_resources.require("%(name)s==%(version)s") # this exact version pkg_resources.require("%(name)s>=%(version)s") # this version or higher """ - if self.install_dir not in map(normalize_path,sys.path): - msg += """ + if self.install_dir not in map(normalize_path,sys.path): + msg += """ Note also that the installation directory must be on sys.path at runtime for this to work. (e.g. by being the application's script directory, by being on @@ -885,6 +884,7 @@ PYTHONPATH, or by being added to sys.path by your code.) eggloc = dist.location name = dist.project_name version = dist.version + extras = '' # TODO: self.report_extras(req, dist) return msg % locals() def report_editable(self, spec, setup_script): -- cgit v1.2.3