Fix #2468
This commit is contained in:
parent
a07369ce69
commit
0547102bdd
5
setup.py
5
setup.py
@ -141,8 +141,11 @@ def cc_version() -> Tuple[str, Tuple[int, int]]:
|
|||||||
else:
|
else:
|
||||||
cc = 'cc'
|
cc = 'cc'
|
||||||
raw = subprocess.check_output([cc, '-dumpversion']).decode('utf-8')
|
raw = subprocess.check_output([cc, '-dumpversion']).decode('utf-8')
|
||||||
ver_ = raw.split('.')[:2]
|
ver_ = raw.strip().split('.')[:2]
|
||||||
try:
|
try:
|
||||||
|
if len(ver_) == 1:
|
||||||
|
ver = int(ver_[0]), 0
|
||||||
|
else:
|
||||||
ver = int(ver_[0]), int(ver_[1])
|
ver = int(ver_[0]), int(ver_[1])
|
||||||
except Exception:
|
except Exception:
|
||||||
ver = (0, 0)
|
ver = (0, 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user