def get_versions(default={"<STR_LIT:version>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"}, verbose=False):
<EOL>keywords = { "<STR_LIT>": git_refnames,<EOL>"<STR_LIT>": git_full_revisionid,<EOL>"<STR_LIT>": git_short_revisionid }<EOL>ver = git_versions_from_keywords(keywords, tag_prefix, verbose)<EOL>if ver:<EOL><INDENT>return ver<EOL><DEDENT>try:<EOL><INDENT>root = os.path.abspath(__file__)<EOL><DEDENT>DO(dustin): Shouldn't this always loop until it fails?<EOL><INDENT>for i in range(len(versionfile_source.split(os.sep))):<EOL><INDENT>root = os.path.dirname(root)<EOL><DEDENT><DEDENT>except NameError:<EOL><INDENT>return default<EOL><DEDENT>return (git_versions_from_vcs(tag_prefix, root, verbose)<EOL>or versions_from_parentdir(parentdir_prefix, root, verbose)<EOL>or default)<EOL>
This variation of get_versions() will be used in _version.py .