Commit cca99ceb authored by PJ Eby's avatar PJ Eby

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
parent 71aeed6a
...@@ -496,7 +496,7 @@ Please make the appropriate changes for your system and try again. ...@@ -496,7 +496,7 @@ Please make the appropriate changes for your system and try again.
self.local_index.add(dist) self.local_index.add(dist)
self.install_egg_scripts(dist) self.install_egg_scripts(dist)
self.installed_projects[dist.key] = 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: if not deps and not self.always_copy:
return return
elif requirement is not None and dist.key != requirement.key: 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. ...@@ -859,10 +859,9 @@ you ignore the conflicts, the installed package(s) may not work.
if not self.ignore_conflicts_at_my_risk: if not self.ignore_conflicts_at_my_risk:
raise DistutilsError("Installation aborted due to conflicts") 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""" """Helpful installation message for display to package users"""
msg = "\n%(what)s %(eggloc)s%(extras)s"
msg = "\n%(what)s %(eggloc)s"
if self.multi_version: if self.multi_version:
msg += """ msg += """
...@@ -875,8 +874,8 @@ similar to one of these examples, in order to select the desired version: ...@@ -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 exact version
pkg_resources.require("%(name)s>=%(version)s") # this version or higher pkg_resources.require("%(name)s>=%(version)s") # this version or higher
""" """
if self.install_dir not in map(normalize_path,sys.path): if self.install_dir not in map(normalize_path,sys.path):
msg += """ msg += """
Note also that the installation directory must be on sys.path at runtime for 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 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.) ...@@ -885,6 +884,7 @@ PYTHONPATH, or by being added to sys.path by your code.)
eggloc = dist.location eggloc = dist.location
name = dist.project_name name = dist.project_name
version = dist.version version = dist.version
extras = '' # TODO: self.report_extras(req, dist)
return msg % locals() return msg % locals()
def report_editable(self, spec, setup_script): def report_editable(self, spec, setup_script):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment