Apparently people out there want to build kitty with rc Go versions
Fixes #6499
This commit is contained in:
parent
93ae6e962f
commit
22dd8ecb62
1 changed files with 5 additions and 1 deletions
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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue