[Python-checkins] CVS: distutils/distutils/command sdist.py,1.22,1.23

Greg Ward python-dev@python.org
2000年5月31日 18:10:59 -0700


Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21561/command
Modified Files:
	sdist.py 
Log Message:
Remember the list of archive files created in 'make_distribution()'.
Added 'get_archive_files()' so outsiders can get their hands on that list.
Index: sdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** sdist.py	2000年05月31日 02:32:10	1.22
--- sdist.py	2000年06月01日 01:10:56	1.23
***************
*** 5,9 ****
 # created 1999年09月22日, Greg Ward
 
! __revision__ = "$Id: sdist.py,v 1.22 2000年05月31日 02:32:10 gward Exp $"
 
 import sys, os, string, re
--- 5,9 ----
 # created 1999年09月22日, Greg Ward
 
! __revision__ = "$Id: sdist.py,v 1.23 2000年06月01日 01:10:56 gward Exp $"
 
 import sys, os, string, re
***************
*** 65,69 ****
--- 65,71 ----
 self.keep_tree = 0
 
+ self.archive_files = None
 
+ 
 def finalize_options (self):
 if self.manifest is None:
***************
*** 521,529 ****
 
 self.make_release_tree (base_dir, self.files)
 for fmt in self.formats:
! self.make_archive (base_dir, fmt, base_dir=base_dir)
 
 if not self.keep_tree:
 remove_tree (base_dir, self.verbose, self.dry_run)
 
 # class sdist
--- 523,541 ----
 
 self.make_release_tree (base_dir, self.files)
+ archive_files = [] # remember names of files we create
 for fmt in self.formats:
! file = self.make_archive (base_dir, fmt, base_dir=base_dir)
! archive_files.append(file)
! 
! self.archive_files = archive_files
 
 if not self.keep_tree:
 remove_tree (base_dir, self.verbose, self.dry_run)
+ 
+ def get_archive_files (self):
+ """Return the list of archive files created when the command
+ was run, or None if the command hasn't run yet.
+ """
+ return self.archive_files
 
 # class sdist

AltStyle によって変換されたページ (->オリジナル) /