MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / get_git_version

Function get_git_version

setup.py:22–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20def add_git_version():
21
22 def get_git_version():
23 from subprocess import check_output
24 try:
25 return check_output("git describe --tags --long --dirty".split()).decode('utf-8').strip()
26 except Exception:
27 return __version__ # noqa
28
29 newlibinfo_content = [l for l in libinfo_content if not l.startswith('__git_version__')]
30 newlibinfo_content.append('__git_version__ = "{}"'.format(get_git_version()))

Callers 1

add_git_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected