[Distutils] Comments on Distutils-0.1.2 on Windows
Thomas Heller
thomas.heller@tascon-gmbh.de
Mon, 17 Jan 2000 20:02:08 +0100
> On 12 January 2000, Thomas Heller said:
> > 1. There is no standard zip-utility under windows,
> > but zip.exe from info-zip works right out of the box.
>
> Oh good! I've changed the comment in the source now.
>
> > I've fixed the source to use James C. Ahlstrom's zipfile.py
> > when zip.exe is not available (Should this always be used?)
>
> Do you mean should zipfile.py be the default rather than the standalone
> zip utility? Not yet -- the latter is far more widespread than the
> former! In Python 1.6, maybe.
Maybe you could include zipfile.py into the distutils package?
>
> Anyways, I've incorporated your support for zipfile.py into the dist
> command, but I don't have that module installed to try it out. The code
> is slightly different from yours, so would you mind trying out the
> attached version of dist.py?
Well, you didn't expect that I would really test it ;-) ?
This code
try:
self.spawn (["zip", "-r", base_dir + ".zip", base_dir])
except DistutilsExecError:
try:
import zipfile
except ImportError:
raise DistutilsExecError, \
fails for two simple reasons:
- You are not doing 'from distutils.errors import *' in dist.py
- self.spawn() raises an OSError, not an DistutilsExecError.
Otherwise your code looks fine. (Except that my patch for using
shutils.copyfile
is missing (if os.link fails).
>
> I'll get to the bugs you found in MSVCCompiler shortly. Thanks!
>
Thank you for distutils!
Thomas