[Python-checkins] CVS: distutils/distutils/command sdist.py,1.45,1.46
Greg Ward
python-dev@python.org
Tue, 5 Sep 2000 19:19:01 -0700
Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv3275
Modified Files:
sdist.py
Log Message:
Bullet-proofing of 'make_release_tree()':
- 'mkpath()' the distribution dir in case of empty manifest
- warn if empty manifest
- detect, warn about, and skip non-regular files in manifest
Index: sdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** sdist.py 2000/09/06 02:08:24 1.45
--- sdist.py 2000/09/06 02:18:59 1.46
***************
*** 406,412 ****
"""
# Create all the directories under 'base_dir' necessary to
! # put 'files' there.
! dir_util.create_tree (base_dir, files,
! verbose=self.verbose, dry_run=self.dry_run)
# And walk over the list of files, either making a hard link (if
--- 406,414 ----
"""
# Create all the directories under 'base_dir' necessary to
! # put 'files' there; the 'mkpath()' is just so we don't die
! # if the manifest happens to be empty.
! self.mkpath(base_dir)
! dir_util.create_tree(base_dir, files,
! verbose=self.verbose, dry_run=self.dry_run)
# And walk over the list of files, either making a hard link (if
***************
*** 424,431 ****
msg = "copying files to %s..." % base_dir
! self.announce (msg)
for file in files:
! dest = os.path.join (base_dir, file)
! self.copy_file (file, dest, link=link)
# make_release_tree ()
--- 426,439 ----
msg = "copying files to %s..." % base_dir
! if not files:
! self.warn("no files to distribute -- empty manifest?")
! else:
! self.announce (msg)
for file in files:
! if not os.path.isfile(file):
! self.warn("'%s' not a regular file -- skipping" % file)
! else:
! dest = os.path.join (base_dir, file)
! self.copy_file (file, dest, link=link)
# make_release_tree ()