class bdist_rpm ( Command):
user_options = [ ('bdist-base=',
None,
"base directory for creating built distributions"), ('rpm-base=', None,
"base directory for creating RPMs (defaults to \"rpm\" under "
"--bdist-base; must be specified for RPM 2)"),
( 'dist-dir=', 'd',
"directory to put final RPM files in "
"(and .spec files if --spec-only)") , ('source-only', None, "only generate source RPM"),
('binary-only', None,
"only generate binary RPM") ]
def _format_changelog(self, changelog):
if not changelog:
return changelog
new_changelog = []
for line in string.split(string.strip(changelog), '\n'):
line = string.strip(line)
if line[0 ] =='*' :
new_changelog.extend ( ['' ])
elif line[0] == '-':
new_changelog.append(line )
else:
new_changelog.append(' '+ line)