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

fix: make debian check non-mandatory
This commit is contained in:
aclist authored and GitHub committed 2026-06-05 19:36:06 +09:00
commit 14752440d1
1 file changed
+6 -6
+6 -6
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)