def find_version(file_path):
with io.open(<EOL>os.path.join(<EOL>os.path.dirname(__file__),<EOL>os.path.normpath(file_path)),<EOL>encoding="<STR_LIT:utf8>") as fp:<EOL><INDENT>content = fp.read()<EOL><DEDENT>version_match = re.search(r"<STR_LIT>",<EOL>content, re.M)<EOL>if version_match:<EOL><INDENT>return version_match.group(<NUM_LIT:1>)<EOL><DEDENT>raise RuntimeError("<STR_LIT>")<EOL>
Find the version of pygccxml.

Used by setup.py and the sphinx's conf.py.
Inspired by https://packaging.python.org/single_source_version/

Args:
    file_path (str): path to the file containing the version.