class SpecFile(object):
"""Class for parsing/modifying spec files"""
tag_re = re.compile(r'^(?P<name>[a-z]+)(?P<num>[0-9]+)?\s*:\s*'
- '(?P<value>\S(.*\S)?)\s*$', flags=re.I)
+ r'(?P<value>\S(.*\S)?)\s*$', flags=re.I)
directive_re = re.compile(r'^%(?P<name>[a-z]+)(?P<num>[0-9]+)?'
- '(\s+(?P<args>.*))?$', flags=re.I)
+ r'(\s+(?P<args>.*))?$', flags=re.I)
gbptag_re = re.compile(r'^\s*#\s*gbp-(?P<name>[a-z-]+)'
- '(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
+ r'(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
# Here "sections" stand for all scripts, scriptlets and other directives,
# but not macros
section_identifiers = ('package', 'description', 'prep', 'build', 'install',