Robert Kern wrote:
Using /usr/bin/unzip to unzip the package seems to strip the executable flags from these files. Stuffit Expander seems to work fine.
I've traced the problem to a deficiency in Python's zipfile (well, one could equally say that there is a deficiency in Info-Zip's code, but Python is still wrong regardless). I have attached a workaround patch to py2app.
-- Robert Kern [EMAIL PROTECTED]
"In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Index: src/bdist_mpkg/cmd_bdist_mpkg.py
===================================================================
--- src/bdist_mpkg/cmd_bdist_mpkg.py (revision 426)
+++ src/bdist_mpkg/cmd_bdist_mpkg.py (working copy)
@@ -434,6 +434,15 @@
if os.path.splitext(fn)[1] == '.gz':
compression= zipfile.ZIP_STORED
z.write(fn, arcfn, compression)
+
+ # ZipFile always marks the files' attributes to be interpreted as if
+ # they came from a Windows host. This interferes with some software
+ # (namely unzip(1) from Info-Zip) from extracting executables with the
+ # proper file attributes. So manually fix the appropriate attributes on
+ # each of the ZipInfo's to specify the host system as a UNIX.
+ for zinfo in z.filelist:
+ zinfo.create_system = 3 # UNIX
+
z.close()
def copy_tree(self, infile, outfile,
_______________________________________________ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig
