summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-17 12:21:05 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-17 12:21:05 (GMT)
commita460f446e92daaf8cd16df773d7646ad6fc8be67 (patch)
tree5823759d623e24c9f4e404916199b5978d480080
parent251b816297bcbb63041cfb70cc6710952c86dd3a (diff)
downloadcpython-a460f446e92daaf8cd16df773d7646ad6fc8be67.zip
cpython-a460f446e92daaf8cd16df773d7646ad6fc8be67.tar.gz
cpython-a460f446e92daaf8cd16df773d7646ad6fc8be67.tar.bz2
- Added support for zip archives
- Better messages in case of a crash of the install-test script
-rw-r--r--Lib/plat-mac/pimp.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py
index dbf40db..c5cf45e 100644
--- a/Lib/plat-mac/pimp.py
+++ b/Lib/plat-mac/pimp.py
@@ -46,6 +46,7 @@ ARCHIVE_FORMATS = [
(".tar.gz", "zcat \"%s\" | tar -xf -"),
(".tgz", "zcat \"%s\" | tar -xf -"),
(".tar.bz", "bzcat \"%s\" | tar -xf -"),
+ (".zip", "unzip \"%s\""),
]
class MyURLopener(urllib.FancyURLopener):
@@ -343,6 +344,16 @@ class PimpPackage:
except _scriptExc_BadInstalled, arg:
return "bad", str(arg)
except:
+ sys.stderr.write("-------------------------------------\n")
+ sys.stderr.write("---- %s: install test got exception\n" % self.fullname())
+ sys.stderr.write("---- source:\n")
+ sys.stderr.write(installTest)
+ sys.stderr.write("---- exception:\n")
+ import traceback
+ traceback.print_exc(file=sys.stderr)
+ if self._db._maintainer:
+ sys.stderr.write("---- Please copy this and mail to %s\n" % self._db._maintainer)
+ sys.stderr.write("-------------------------------------\n")
return "bad", "Package install test got exception"
return "yes", ""
@@ -540,10 +551,9 @@ class PimpPackage_binary(PimpPackage):
else:
return "unknown extension for archive file: %s" % filename
- # Modify where the files are extracted
- prefixmod = '-C /'
+ # Extract the files in the root folder.
cmd = cmd % self.archiveFilename
- if self._cmd(output, self._db.preferences.buildDir, cmd, prefixmod):
+ if self._cmd(output, "/", cmd):
return "unpack command failed"
self.afterInstall()