code
stringlengths
3
6.57k
tarballs (built by setup.py sdist)
directories (produced by setup.py build)
get_keywords()
get_keywords()
get_config()
VersioneerConfig()
VersioneerConfig()
NotThisMethod(Exception)
register_vcs_handler(vcs, method)
decorate(f)
command(s)
isinstance(commands, list)
str([c] + args)
sys.exc_info()
print("unable to run %s" % dispcmd)
print(e)
print("unable to find command, tried %s" % (commands,)
p.communicate()
strip()
stdout.decode()
print("unable to run %s (error)
print("stdout was %s" % stdout)
versions_from_parentdir(parentdir_prefix, root, verbose)
range(3)
os.path.basename(root)
dirname.startswith(parentdir_prefix)
len(parentdir_prefix)
rootdirs.append(root)
os.path.dirname(root)
str(rootdirs)
NotThisMethod("rootdir doesn't start with parentdir_prefix")
register_vcs_handler("git", "get_keywords")
git_get_keywords(versionfile_abs)
open(versionfile_abs, "r")
f.readlines()
line.strip()
startswith("git_refnames =")
re.search(r'=\s*"(.*)
mo.group(1)
line.strip()
startswith("git_full =")
re.search(r'=\s*"(.*)
mo.group(1)
line.strip()
startswith("git_date =")
re.search(r'=\s*"(.*)
mo.group(1)
f.close()
register_vcs_handler("git", "keywords")
git_versions_from_keywords(keywords, tag_prefix, verbose)
NotThisMethod("no keywords at all, weird")
keywords.get("date")
date.strip()
replace(" ", "T", 1)
replace(" ", "", 1)
strip()
refnames.startswith("$Format")
print("keywords are unexpanded, not using")
NotThisMethod("unexpanded keywords, not a git-archive tarball")
set([r.strip()
refnames.strip("()
split(",")
set([r[len(TAG)
r.startswith(TAG)
set([r for r in refs if re.search(r'\d', r)
print("discarding '%s', no digits" % ",".join(refs - tags)
print("likely tags: %s" % ",".join(sorted(tags)
sorted(tags)
ref.startswith(tag_prefix)
len(tag_prefix)
print("picking %s" % r)
strip()
print("no suitable tags, using unknown + full revision id")
strip()
register_vcs_handler("git", "pieces_from_vcs")
git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command)
print("Directory %s not under git control" % root)
NotThisMethod("'git rev-parse --git-dir' returned error")
NotThisMethod("'git describe' failed")
describe_out.strip()
run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
NotThisMethod("'git rev-parse' failed")
full_out.strip()
git_describe.endswith("-dirty")
git_describe.rindex("-dirty")
re.search(r'^(.+)
g([0-9a-f]+)
mo.group(1)
full_tag.startswith(tag_prefix)
print(fmt % (full_tag, tag_prefix)
len(tag_prefix)
int(mo.group(2)
mo.group(3)
int(count_out)
git_versions_from_keywords()
strip()
date.strip()
replace(" ", "T", 1)
replace(" ", "", 1)
plus_or_dot(pieces)