def _build(self, src, path, dest, mtime):
input_path = os.path.join(src, path)<EOL>output_paths = [os.path.join(dest, output) for output in<EOL>self._outputs(src, path)]<EOL>if path in self.failures and mtime <= self.failures[path]:<EOL><INDENT>return<EOL><DEDENT>for output in output_paths:<EOL><INDENT>try:<EOL><INDENT>ifos.path.exists(output) andmtime <= os.path.getmtime(output):<EOL><INDENT>continue<EOL><DEDENT><DEDENT>except EnvironmentError:<EOL><INDENT>pass<EOL><DEDENT>start = time.time()<EOL>try:<EOL><INDENT>self.build(input_path, output_paths)<EOL><DEDENT>except Exception as e:<EOL><INDENT>if isinstance(e, EnvironmentError):<EOL><INDENT>logging.error("<STR_LIT>".format(<EOL>termcolor.colored(path, "<STR_LIT>", attrs=["<STR_LIT>"]),<EOL>time.time() - start, e.args[<NUM_LIT:0>]<EOL>))<EOL><DEDENT>else:<EOL><INDENT>logging.exception("<STR_LIT>".format(<EOL>termcolor.colored(path, "<STR_LIT>", attrs=["<STR_LIT>"]),<EOL>time.time() - start<EOL>))<EOL><DEDENT>self.failures[path] = start<EOL><DEDENT>else:<EOL><INDENT>logging.info("<STR_LIT>".format(<EOL>termcolor.colored(path, "<STR_LIT>", attrs=["<STR_LIT>"]),<EOL>time.time() - start<EOL>))<EOL>self.failures.pop(path, None)<EOL><DEDENT>break<EOL><DEDENT>
Calls `build` after testing that at least one output file (as
        returned by `_outputs()` does not exist or is older than `mtime`. If
        the build fails, the build time is recorded and no other builds will be
        attempted on `input` until this method is called with a larger mtime.