[Python-checkins] CVS: distutils/distutils archive_util.py,1.4,1.5
Greg Ward
python-dev@python.org
Wed, 31 May 2000 18:08:01 -0700
Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21279
Modified Files:
archive_util.py
Log Message:
Ensure that 'make_archive()' returns the name of the new archive file.
Index: archive_util.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/archive_util.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** archive_util.py 2000/05/31 02:17:19 1.4
--- archive_util.py 2000/06/01 01:07:55 1.5
***************
*** 6,10 ****
# created 2000/04/03, Greg Ward (extracted from util.py)
! __revision__ = "$Id: archive_util.py,v 1.4 2000/05/31 02:17:19 gward Exp $"
import os
--- 6,10 ----
# created 2000/04/03, Greg Ward (extracted from util.py)
! __revision__ = "$Id: archive_util.py,v 1.5 2000/06/01 01:07:55 gward Exp $"
import os
***************
*** 128,132 ****
root_dir=None, base_dir=None,
verbose=0, dry_run=0):
-
"""Create an archive file (eg. zip or tar). 'base_name' is the name
of the file to create, minus any format-specific extension; 'format'
--- 128,131 ----
***************
*** 137,142 ****
ie. 'base_dir' will be the common prefix of all files and
directories in the archive. 'root_dir' and 'base_dir' both default
! to the current directory."""
!
save_cwd = os.getcwd()
if root_dir is not None:
--- 136,141 ----
ie. 'base_dir' will be the common prefix of all files and
directories in the archive. 'root_dir' and 'base_dir' both default
! to the current directory. Returns the name of the archive file.
! """
save_cwd = os.getcwd()
if root_dir is not None:
***************
*** 161,165 ****
for (arg,val) in format_info[1]:
kwargs[arg] = val
! apply (func, (base_name, base_dir), kwargs)
if root_dir is not None:
--- 160,164 ----
for (arg,val) in format_info[1]:
kwargs[arg] = val
! filename = apply (func, (base_name, base_dir), kwargs)
if root_dir is not None:
***************
*** 167,170 ****
--- 166,171 ----
print "changing back to '%s'" % save_cwd
os.chdir (save_cwd)
+
+ return filename
# make_archive ()