def METHOD_NAME(self, modname, packagename):
    s = [self.semodule_package]
    s.append("-o")
    s.append(packagename)
    s.append("-m")
    s.append(modname)
    rc = self.run(" ".join(s))
    if rc != 0:
        raise RuntimeError("packaging failed [%s]" % self.last_output)