Find user includes (no system includes) requested from given source file.

    All .h files will be given relative to the current folder, e.g.
    ["c/rowindex.h", "c/column.h"].

def find_includes(filename):
    """
    Find user includes (no system includes) requested from given source file.

    All .h files will be given relative to the current folder, e.g.
    ["c/rowindex.h", "c/column.h"].
    """
    includes = []
    with open(filename, "r", encoding="utf-8") as inp:
        for line in inp:
            line = line.strip()
            if not line or line.startswith("//"):
                continue
            if line.startswith("#"):
                mm = re.match(rx_include, line)
                if mm:
                    includename = os.path.join("c", mm.group(1))
                    includes.append(includename)
    return includes