def parse(version):
match = _REGEX.match(version)<EOL>if match is None:<EOL><INDENT>raise ValueError('<STR_LIT>' % version)<EOL><DEDENT>verinfo = match.groupdict()<EOL>verinfo['<STR_LIT>'] = int(verinfo['<STR_LIT>'])<EOL>verinfo['<STR_LIT>'] = int(verinfo['<STR_LIT>'])<EOL>verinfo['<STR_LIT>'] = int(verinfo['<STR_LIT>'])<EOL>return verinfo<EOL>
Parse version to major, minor, patch, pre-release, build parts.