We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Added check_system_packages function to check for system package availability
1 parent 7fd14b7 commit 4d1d161Copy full SHA for 4d1d161
1 file changed
Core/sys_deps.py
@@ -920,6 +920,23 @@ def install_packages_linux(
920
return None
921
922
923
+def check_system_packages(packages: list[str]) -> bool:
924
+ """
925
+ Check if system packages/tools are installed.
926
+ Returns True if all packages/tools are available, False otherwise.
927
+ Uses shutil.which() to check for command availability.
928
929
+ try:
930
+ if not packages:
931
+ return True
932
+ for pkg in packages:
933
+ if pkg and not shutil.which(pkg):
934
+ return False
935
936
+ except Exception:
937
938
+
939
940
def install_system_packages(packages: list[str], gui) -> bool:
941
"""
942
Install system packages using the appropriate package manager.
0 commit comments