summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/sdist.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-06-01 01:10:56 (GMT)
committerGreg Ward <gward@python.net>2000-06-01 01:10:56 (GMT)
commitd87eb73f32d9963d1293de702c28ae81b50c623e (patch)
tree8b1103c072a87aa0947a6118682cfb8b4544f30b /Lib/distutils/command/sdist.py
parent282c7a0230b578147a89a18ec22410b830edddfe (diff)
downloadcpython-d87eb73f32d9963d1293de702c28ae81b50c623e.zip
cpython-d87eb73f32d9963d1293de702c28ae81b50c623e.tar.gz
cpython-d87eb73f32d9963d1293de702c28ae81b50c623e.tar.bz2
Remember the list of archive files created in 'make_distribution()'.
Added 'get_archive_files()' so outsiders can get their hands on that list.
Diffstat (limited to 'Lib/distutils/command/sdist.py')
-rw-r--r--Lib/distutils/command/sdist.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index c06860f..03de85b 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -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