<s> import distutils . command . bdist_rpm as orig <EOL> class bdist_rpm ( orig . bdist_rpm ) : <EOL> """<STR_LIT>""" <EOL> def run ( self ) : <EOL> self . run_command ( '<STR_LIT>' ) <EOL> orig . bdist_rpm . run ( self ) <EOL> def _make_spec_file ( self ) : <EOL> version = self . distribution . get_version ( ) <EOL> rpmversion = version . replace ( '<STR_LIT:->' , '<STR_LIT:_>' ) <EOL> spec = orig . bdist_rpm . _make_spec_file ( self ) <EOL> line23 = '<STR_LIT>' + version <EOL> line24 = '<STR_LIT>' + rpmversion <EOL> spec = [ <EOL> line . replace ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ) . replace ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ) . replace ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ) . replace ( line23 , line24 ) <EOL> for line in spec <EOL> ] <EOL> insert_loc = spec . index ( line24 ) + <NUM_LIT:1> <EOL> unmangled_version = "<STR_LIT>" + version <EOL> spec . insert ( insert_loc , unmangled_version ) <EOL> return spec </s>
