def __init__(self, data, jobNum, xmlcache, pretend=False): self.filename, self.format = data self.jobNum = jobNum self.xmlcache = xmlcache self.pretend = pretend self.tempDeps = portautils.mktemp('bakefile') self.tempChanges = portautils.mktemp('bakefile') self.process = None
def invoke_em(writer, file, method): import empy.em rulesdir, template = __findWriter(writer) filename = portautils.mktemp('bakefile') empy.em.invoke([ '-I', 'mk', '-I', 'writer', '-I', 'utils', '-I', 'os,os.path', '-B', '-o', filename, '-E', 'globals().update(writer.__preparedMkVars)', '-D', 'RULESDIR="%s"' % rulesdir.replace('\\', '\\\\'), template ]) txt = __readFile(filename) os.remove(filename) writeFile(file, txt, method)
def invoke_em(writer, file, method): import empy.em rulesdir, template = __findWriter(writer) filename = portautils.mktemp('bakefile') empy.em.invoke(['-I','mk', '-I','writer', '-I','utils', '-I','os,os.path', '-B', '-o',filename, '-E','globals().update(writer.__preparedMkVars)', '-D','RULESDIR="%s"' % rulesdir.replace('\\','\\\\'), template]) txt = __readFile(filename) os.remove(filename) writeFile(file, txt, method)