mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 14:34:52 +02:00
Apparently people out there want to build kitty with rc Go versions
Fixes #6499
This commit is contained in:
6
setup.py
6
setup.py
@@ -956,7 +956,11 @@ def update_go_generated_files(args: Options, kitty_exe: str) -> None:
|
||||
|
||||
|
||||
def parse_go_version(x: str) -> Tuple[int, int, int]:
|
||||
ans = list(map(int, x.split('.')))
|
||||
def safe_int(x: str) -> int:
|
||||
with suppress(ValueError):
|
||||
return int(x)
|
||||
return int(re.split(r'[a-zA-Z]', x)[0])
|
||||
ans = list(map(safe_int, x.split('.')))
|
||||
while len(ans) < 3:
|
||||
ans.append(0)
|
||||
return ans[0], ans[1], ans[2]
|
||||
|
||||
Reference in New Issue
Block a user