]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remember the list of archive files created in 'make_distribution()'.
authorGreg Ward <gward@python.net>
Thu, 1 Jun 2000 01:10:56 +0000 (01:10 +0000)
committerGreg Ward <gward@python.net>
Thu, 1 Jun 2000 01:10:56 +0000 (01:10 +0000)
Added 'get_archive_files()' so outsiders can get their hands on that list.

Lib/distutils/command/sdist.py

index c06860fb65a5d2db7e82e5f974026b751190a43e..03de85b1aee35d0f0936a83d14c5eb6cea04f1be 100644 (file)
@@ -64,6 +64,8 @@ class sdist (Command):
         self.formats = None
         self.keep_tree = 0
 
+        self.archive_files = None
+
 
     def finalize_options (self):
         if self.manifest is None:
@@ -520,12 +522,22 @@ class sdist (Command):
         self.exclude_pattern (base_dir + "*")
  
         self.make_release_tree (base_dir, self.files)
+        archive_files = []              # remember names of files we create
         for fmt in self.formats:
-            self.make_archive (base_dir, fmt, base_dir=base_dir)
+            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