def get_maintainer(self, makepkg_conf): default = 'Your Name <YourEmail "AT" example "DOT" com>' try: for line in open(makepkg_conf): if line.startswith('PACKAGER='): return line.strip('PACKAGER=\n ')[1:-1] return default except IOError as e: util.warn("Could not read %s: %s" % (e.filename, e.strerror)) return default
def get_summary(self, summary): if len(summary) > 80: util.warn("Summary too long, cut it back to 80 characters.") return "\"" + summary + "\""
def get_licenses(self, licenses): if not licenses or len(licenses) == 0: util.warn("License not found! Figure it out and add it.") return "()" else: return "(%s)" % " ".join('%r' % license for license in licenses)