def get_pkg_version():
try:<EOL><INDENT>with open("<STR_LIT>", "<STR_LIT:r>") as fp:<EOL><INDENT>rgx = re.compile(r"<STR_LIT>")<EOL>for line in fp.readlines():<EOL><INDENT>match = rgx.match(line)<EOL>if match:<EOL><INDENT>return match.group(<NUM_LIT:1>)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except IOError:<EOL><INDENT>return None<EOL><DEDENT>
Get version string by parsing PKG-INFO.