MCPcopy
hub / github.com/MagicStack/asyncpg / git_commitish

Function git_commitish

setup.py:58–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 # This is a git checkout, use git to
57 # generate a precise version.
58 def git_commitish():
59 env = {}
60 v = os.environ.get('PATH')
61 if v is not None:
62 env['PATH'] = v
63
64 git = subprocess.run(['git', 'rev-parse', 'HEAD'], env=env,
65 cwd=str(_ROOT), stdout=subprocess.PIPE)
66 if git.returncode == 0:
67 commitish = git.stdout.strip().decode('ascii')
68 else:
69 commitish = 'unknown'
70
71 return commitish
72
73 VERSION += '+' + git_commitish()[:7]
74

Callers 1

setup.pyFile · 0.85

Calls 2

getMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…