def METHOD_NAME(self, sourcename, modname):
    s = [self.checkmodule]
    if self.mls:
        s.append("-M")
    if self.module:
        s.append("-m")
    s.append("-o")
    s.append(modname)
    s.append(sourcename)
    rc = self.run(" ".join(s))
    if rc != 0:
        raise RuntimeError("compilation failed:\n%s" % self.last_output)