def find_eigen(hint=None):
<EOL>try:<EOL><INDENT>import pkgconfig<EOL>if pkgconfig.installed('<STR_LIT>','<STR_LIT>'):<EOL><INDENT>return pkgconfig.parse('<STR_LIT>')['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>search_dirs = [] if hint is None else hint<EOL>search_dirs += [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>for d in search_dirs:<EOL><INDENT>path = os.path.join(d, "<STR_LIT>", "<STR_LIT>")<EOL>if os.path.exists(path):<EOL><INDENT>vf = os.path.join(d, "<STR_LIT>", "<STR_LIT:src>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>if not os.path.exists(vf):<EOL><INDENT>continue<EOL><DEDENT>src = open(vf, "<STR_LIT:r>").read()<EOL>v1 = re.findall("<STR_LIT>", src)<EOL>v2 = re.findall("<STR_LIT>", src)<EOL>v3 = re.findall("<STR_LIT>", src)<EOL>if not len(v1) or not len(v2) or not len(v3):<EOL><INDENT>continue<EOL><DEDENT>v = "<STR_LIT>".format(v1[<NUM_LIT:0>], v2[<NUM_LIT:0>], v3[<NUM_LIT:0>])<EOL>print("<STR_LIT>".format(v, d))<EOL>return d<EOL><DEDENT><DEDENT>return None<EOL>
r'''
  Try to find the Eigen library. If successful the include directory is returned.