Well, I finally got a chance to test distutils 0.1.2 under Windows.
I've fixed the source to use James C. Ahlstrom's zipfile.py when zip.exe is not available (Should this always be used?)
class Dist (Command): ... def make_zipfile (self, base_dir):
# This assumes the Unix 'zip' utility -- it could be easily recast
# to use pkzip (or whatever the command-line zip creation utility
# on Redmond's archaic CP/M knockoff is nowadays), but I'll let
# someone who can actually test it do that.
try:
self.spawn (["zip", "-r", base_dir + ".zip", base_dir])
except OSError:
import zipfile
z = zipfile.ZipFile (base_dir + ".zip", "wb",
compression=zipfile.ZIP_DEFLATED)
def visit (z, dirname, names):
for name in names:
path = os.path.join (dirname, name)
if os.path.isfile (path):
z.write (path, path)
os.path.walk (base_dir, visit, z)
z.close()
class MSVCCompiler (CCompiler): ... def library_filename (self, libname): """Return the static library filename corresponding to the specified library name."""
# return "lib%s%s" %( libname, self._static_lib_ext )
return "%s%s" %( libname, self._static_lib_ext )
def shared_library_filename (self, libname):
"""Return the shared library filename corresponding to the
specified library name."""
# return "lib%s%s" %( libname, self._shared_lib_ext )
return "%s%s" %( libname, self._shared_lib_ext )
class Dist (Command): def make_release_tree (self, base_dir, files): ... self.announce ("making hard links in %s..." % base_dir) for file in files: dest = os.path.join (base_dir, file) if not os.path.exists (dest): try: self.execute (os.link, (file, dest), "linking %s -> %s" % (file, dest)) except AttributeError: import shutil self.execute (shutil.copyfile, (file, dest), "copying %s -> %s" % (file, dest))
Regards
Thomas Heller ION-TOF GmbH