mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
the 'no_format_option' class attribute.
This commit is contained in:
parent
d5b53df18c
commit
52e399c904
1 changed files with 7 additions and 2 deletions
|
@ -22,6 +22,9 @@ class bdist (Command):
|
||||||
"(tar, ztar, gztar, bztar, zip, ... )"),
|
"(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,
|
# This won't do in reality: will need to distinguish RPM-ish Linux,
|
||||||
# Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
|
# Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
|
||||||
default_format = { 'posix': 'gztar',
|
default_format = { 'posix': 'gztar',
|
||||||
|
@ -31,6 +34,7 @@ class bdist (Command):
|
||||||
'bztar': 'bdist_dumb',
|
'bztar': 'bdist_dumb',
|
||||||
'ztar': 'bdist_dumb',
|
'ztar': 'bdist_dumb',
|
||||||
'tar': 'bdist_dumb',
|
'tar': 'bdist_dumb',
|
||||||
|
'rpm': 'bdist_rpm',
|
||||||
'zip': 'bdist_dumb', }
|
'zip': 'bdist_dumb', }
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,8 +67,9 @@ class bdist (Command):
|
||||||
raise DistutilsOptionError, \
|
raise DistutilsOptionError, \
|
||||||
"invalid archive format '%s'" % self.format
|
"invalid archive format '%s'" % self.format
|
||||||
|
|
||||||
sub_cmd = self.find_peer (cmd_name)
|
if cmd_name not in self.no_format_option:
|
||||||
sub_cmd.format = self.format
|
sub_cmd = self.find_peer (cmd_name)
|
||||||
|
sub_cmd.format = self.format
|
||||||
self.run_peer (cmd_name)
|
self.run_peer (cmd_name)
|
||||||
|
|
||||||
# run()
|
# run()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue