MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / git_commitish

Function git_commitish

setup.py:67–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 # This is a git checkout, use git to
66 # generate a precise version.
67 def git_commitish():
68 env = {}
69 v = os.environ.get('PATH')
70 if v is not None:
71 env['PATH'] = v
72
73 git = subprocess.run(['git', 'rev-parse', 'HEAD'], env=env,
74 cwd=str(_ROOT), stdout=subprocess.PIPE)
75 if git.returncode == 0:
76 commitish = git.stdout.strip().decode('ascii')
77 else:
78 commitish = 'unknown'
79
80 return commitish
81
82 VERSION += '+' + git_commitish()[:7]
83

Callers 1

setup.pyFile · 0.85

Calls 2

getMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected