diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-13 01:49:56 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-13 01:49:56 (GMT) |
commit | 52e399c9048ed23fb9a97b925721e5aeed2b7e90 (patch) | |
tree | 496ef24d49d60f136723275b0c4cc84ac2c726a3 /Lib/distutils/command/bdist.py | |
parent | d5b53df18c4b686f789bf1d981f3f72da9ba29f0 (diff) | |
download | cpython-52e399c9048ed23fb9a97b925721e5aeed2b7e90.zip cpython-52e399c9048ed23fb9a97b925721e5aeed2b7e90.tar.gz cpython-52e399c9048ed23fb9a97b925721e5aeed2b7e90.tar.bz2 |
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
the 'no_format_option' class attribute.
Diffstat (limited to 'Lib/distutils/command/bdist.py')
-rw-r--r-- | Lib/distutils/command/bdist.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py index 01b4e16..970779d 100644 --- a/Lib/distutils/command/bdist.py +++ b/Lib/distutils/command/bdist.py @@ -22,6 +22,9 @@ class bdist (Command): "(tar, ztar, gztar, bztar, zip, ... )"), ] + # The following commands do not take a format option from bdist + no_format_option = ('bdist_rpm',) + # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. default_format = { 'posix': 'gztar', @@ -31,6 +34,7 @@ class bdist (Command): 'bztar': 'bdist_dumb', 'ztar': 'bdist_dumb', 'tar': 'bdist_dumb', + 'rpm': 'bdist_rpm', 'zip': 'bdist_dumb', } @@ -63,8 +67,9 @@ class bdist (Command): raise DistutilsOptionError, \ "invalid archive format '%s'" % self.format - sub_cmd = self.find_peer (cmd_name) - sub_cmd.format = self.format + if cmd_name not in self.no_format_option: + sub_cmd = self.find_peer (cmd_name) + sub_cmd.format = self.format self.run_peer (cmd_name) # run() |