@@ -919,7 +919,6 @@ def install_packages_linux(
919919 except Exception :
920920 return None
921921
922-
923922def check_system_packages (packages : list [str ]) -> bool :
924923 """
925924 Check if system packages/tools are installed.
@@ -935,46 +934,3 @@ def check_system_packages(packages: list[str]) -> bool:
935934 return True
936935 except Exception :
937936 return False
938-
939-
940- def install_system_packages (packages : list [str ], gui ) -> bool :
941- """
942- Install system packages using the appropriate package manager.
943- Returns True if successful, False otherwise.
944- """
945- try :
946- manager = SysDependencyManager (gui )
947- system = platform .system ().lower ()
948-
949- if system == "linux" :
950- # For Linux, use the install_packages_linux method
951- process = manager .install_packages_linux (packages )
952- if process :
953- # Wait for completion (simplified - in practice should be async)
954- process .waitForFinished (300000 ) # 5 minutes timeout
955- return process .exitCode () == 0
956- elif system == "windows" :
957- # For Windows, convert package names to winget format
958- # This is a simplified mapping - in practice would need proper mapping
959- winget_packages = []
960- for pkg in packages :
961- # Basic mapping - would need expansion for real use
962- if pkg == "build-essential" :
963- winget_packages .append ({"id" : "Microsoft.VisualStudio.2022.BuildTools" })
964- elif pkg == "python3-dev" :
965- winget_packages .append ({"id" : "Python.Python.3" })
966- else :
967- # Generic fallback
968- winget_packages .append ({"id" : pkg })
969-
970- process = manager .install_packages_windows (winget_packages )
971- if process :
972- process .waitForFinished (300000 ) # 5 minutes timeout
973- return process .exitCode () == 0
974- else :
975- # Unsupported platform
976- return False
977-
978- return False
979- except Exception :
980- return False
0 commit comments