mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Added 'list_only' option (and modified 'run()' to respect it).
This commit is contained in:
parent
274ad9dc81
commit
b24afe19db
1 changed files with 9 additions and 1 deletions
|
@ -133,6 +133,8 @@ class Dist (Command):
|
||||||
"formats for source distribution (tar, ztar, gztar, or zip)"),
|
"formats for source distribution (tar, ztar, gztar, or zip)"),
|
||||||
('manifest=', 'm',
|
('manifest=', 'm',
|
||||||
"name of manifest file"),
|
"name of manifest file"),
|
||||||
|
('list-only', 'l',
|
||||||
|
"just list files that would be distributed"),
|
||||||
]
|
]
|
||||||
|
|
||||||
default_format = { 'posix': 'gztar',
|
default_format = { 'posix': 'gztar',
|
||||||
|
@ -144,6 +146,7 @@ class Dist (Command):
|
||||||
def set_default_options (self):
|
def set_default_options (self):
|
||||||
self.formats = None
|
self.formats = None
|
||||||
self.manifest = None
|
self.manifest = None
|
||||||
|
self.list_only = 0
|
||||||
|
|
||||||
|
|
||||||
def set_final_options (self):
|
def set_final_options (self):
|
||||||
|
@ -169,7 +172,12 @@ class Dist (Command):
|
||||||
self.find_defaults ()
|
self.find_defaults ()
|
||||||
self.read_manifest ()
|
self.read_manifest ()
|
||||||
|
|
||||||
self.make_distribution ()
|
if self.list_only:
|
||||||
|
for f in self.files:
|
||||||
|
print f
|
||||||
|
|
||||||
|
else:
|
||||||
|
self.make_distribution ()
|
||||||
|
|
||||||
|
|
||||||
def check_metadata (self):
|
def check_metadata (self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue