[Python-bugs-list] [ python-Bugs-639118 ] archiver should use zipfile before zip

noreply@sourceforge.net noreply@sourceforge.net
Fri, 15 Nov 2002 13:33:50 -0800


Bugs item #639118, was opened at 2002-11-15 15:33
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=639118&group_id=5470

Category: Distutils
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: ollie oldham (ooldham)
Assigned to: Nobody/Anonymous (nobody)
Summary: archiver should use zipfile before zip

Initial Comment:
The distutils archiver should attempt zipfile.py usage 
before attempting a spawn of an external 'zip'.

The current code in archive_util.py attempts to spawn an 
external 'zip' program for zip action, if this fails, an 
attempt to import zipfile.py is made...

This bites folks who have 'old' or non-conforming zip 
programs on windows platforms...

Have had a conversation about this with thellar, and he 
suggested  A: a bug report, B: changing code to attempt 
import first, then take spawn action if that fails.

Since this is my first bug report, I am attaching a 
archive_util.py that I have modified to do this... I also 
modified this particular file to not use the '-q' option when 
in verbose mode, for the zip spawn. Also modified so 
that if in verbose mode, what gets added to zip file 
during zipfile usage gets printed to stdio.

I tested the attached file for with and w/o verbose, and 
test with and w/o zipfile.py to force the different code 
path executions. Also forced error of having no zipfile.py 
and no external zip program.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=639118&group_id=5470