mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Use git rev-parse instead, more robust
This commit is contained in:
parent
fa064bf9cf
commit
2efa83bc4d
3
setup.py
3
setup.py
@ -183,8 +183,7 @@ def init_env(
|
||||
sysconfig.get_config_var('CCSHARED')
|
||||
)
|
||||
if os.path.exists('.git'):
|
||||
head = open('.git/HEAD', 'r').read().split(':', 1)[-1].strip()
|
||||
rev = open('.git/' + head).read().split(':', 1)[-1].strip()
|
||||
rev = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()
|
||||
cflags.append('-DKITTY_VCS_REV="{}"'.format(rev))
|
||||
ldflags = os.environ.get(
|
||||
'OVERRIDE_LDFLAGS',
|
||||
|
Loading…
Reference in New Issue
Block a user