def add_preserved_path_segment(self, infile, outfiles, state):
    result = []
    in_abs = infile.absolute_path(state.environment.source_dir, state.environment.build_dir)
    assert os.path.isabs(self.preserve_path_from)
    rel = os.path.relpath(in_abs, self.preserve_path_from)
    path_segment = os.path.dirname(rel)
    for of in outfiles:
        result.append(os.path.join(path_segment, of))
    return result
def add_preserved_path_segment(self, infile, outfiles, state):
    result = []
    in_abs = infile.absolute_path(state.environment.source_dir, state.environment.build_dir)
    assert os.path.isabs(self.preserve_path_from)
    rel = os.path.relpath(in_abs, self.preserve_path_from)
    path_segment = os.path.dirname(rel)
    for of in outfiles:
        result.append(os.path.join(path_segment, of))
    return result