diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-16 23:03:04 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-16 23:03:04 (GMT) |
commit | a2125fe523cc956f579b408450b32322e769f595 (patch) | |
tree | 916bee83be601fa7d11129377cd1e1863e184ff6 | |
parent | 9f70aabbf87c0e16029f3457a6b58e322e615b68 (diff) | |
download | cpython-a2125fe523cc956f579b408450b32322e769f595.zip cpython-a2125fe523cc956f579b408450b32322e769f595.tar.gz cpython-a2125fe523cc956f579b408450b32322e769f595.tar.bz2 |
Better error messages and warnings.
-rw-r--r-- | Lib/plat-mac/pimp.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py index fec0401..dbf40db 100644 --- a/Lib/plat-mac/pimp.py +++ b/Lib/plat-mac/pimp.py @@ -357,7 +357,9 @@ class PimpPackage: rv = [] if not self._dict.get('Download-URL'): - return [(None, "This package needs to be installed manually")] + return [(None, + "%s: This package needs to be installed manually (no Download-URL field)" % + self.fullname())] if not self._dict.get('Prerequisites'): return [] for item in self._dict['Prerequisites']: @@ -447,14 +449,15 @@ class PimpPackage: break else: return "unknown extension for archive file: %s" % filename - basename = filename[:-len(ext)] + self.basename = filename[:-len(ext)] cmd = cmd % self.archiveFilename if self._cmd(output, self._db.preferences.buildDir, cmd): return "unpack command failed" def installPackageOnly(self, output=None): """Default install method, to be overridden by subclasses""" - return "Cannot automatically install package %s" % self.fullname() + return "%s: This package needs to be installed manually (no support for flavor=\"%s\")" \ + % (self.fullname(), self._dict.get(flavor, "")) def installSinglePackage(self, output=None): """Download, unpack and install a single package. @@ -463,14 +466,14 @@ class PimpPackage: will receive a log of what happened.""" if not self._dict['Download-URL']: - return "%s: This package needs to be installed manually" % _fmtpackagename(self) + return "%s: This package needs to be installed manually (no Download-URL field)" % _fmtpackagename(self) msg = self.downloadPackageOnly(output) if msg: - return "download %s: %s" % (self.fullname(), msg) + return "%s: download: %s" % (self.fullname(), msg) msg = self.unpackPackageOnly(output) if msg: - return "unpack %s: %s" % (self.fullname(), msg) + return "%s: unpack: %s" % (self.fullname(), msg) return self.installPackageOnly(output) @@ -517,6 +520,7 @@ class PimpPackage_binary(PimpPackage): If output is given it should be a file-like object and it will receive a log of what happened.""" + print 'PimpPackage_binary installPackageOnly' msgs = [] if self._dict.has_key('Pre-install-command'): @@ -557,7 +561,7 @@ class PimpPackage_source(PimpPackage): """Unpack a source package and check that setup.py exists""" PimpPackage.unpackPackageOnly(self, output) # Test that a setup script has been create - self._buildDirname = os.path.join(self._db.preferences.buildDir, basename) + self._buildDirname = os.path.join(self._db.preferences.buildDir, self.basename) setupname = os.path.join(self._buildDirname, "setup.py") if not os.path.exists(setupname) and not NO_EXECUTE: return "no setup.py found after unpack of archive" |