MCPcopy
hub / github.com/quantopian/zipline / versions_from_parentdir

Function versions_from_parentdir

versioneer.py:1114–1125  ·  view source on GitHub ↗
(parentdir_prefix, root, verbose)

Source from the content-addressed store, hash-verified

1112
1113
1114def versions_from_parentdir(parentdir_prefix, root, verbose):
1115 # Source tarballs conventionally unpack into a directory that includes
1116 # both the project name and a version string.
1117 dirname = os.path.basename(root)
1118 if not dirname.startswith(parentdir_prefix):
1119 if verbose:
1120 print("guessing rootdir is '%s', but '%s' doesn't start with "
1121 "prefix '%s'" % (root, dirname, parentdir_prefix))
1122 raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
1123 return {"version": dirname[len(parentdir_prefix):],
1124 "full-revisionid": None,
1125 "dirty": False, "error": None}
1126
1127SHORT_VERSION_PY = """
1128# This file was generated by 'versioneer.py' (0.15) from

Callers 1

get_versionsFunction · 0.70

Calls 2

NotThisMethodClass · 0.70
startswithMethod · 0.45

Tested by

no test coverage detected