Merge pull request #335 from aclist/fix/libgi-check

fix: make debian check non-mandatory
This commit is contained in:
aclist 2026-06-05 19:36:06 +09:00 committed by GitHub
commit 14752440d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,10 +2,11 @@ import platform
import sys
from pathlib import Path
from warnings import deprecated
LIB = "libgirepository-2.0"
@deprecated("currently unused")
def is_debian() -> bool:
"""
cf.
@ -33,8 +34,7 @@ def is_debian() -> bool:
return True
id_like = release["ID_LIKE"]
return id_like in strings
except Exception as e:
print(e)
except Exception:
return False
@ -45,7 +45,7 @@ def has_libgi() -> bool:
def test_missing_lib() -> bool:
if is_debian() and has_libgi() is False:
# TODO: clean up warning
print(f"sudo apt install {LIB}")
msg = f"System is missing the required library '{LIB}'. Install it via your system package manager."
if has_libgi() is False:
print(msg)
sys.exit(1)