(distro: str, deps_list)
| 122 | sys.exit(1) |
| 123 | |
| 124 | def install_sys_deps(distro: str, deps_list): |
| 125 | deps_list = prune_existing_sys_deps(deps_list) |
| 126 | command = [] |
| 127 | if distro == 'dnf': |
| 128 | command = ['sudo', 'dnf', '-y', 'install'] |
| 129 | elif distro == 'emerge': |
| 130 | command = ['sudo', 'emerge', "--update"] |
| 131 | elif distro == 'apt': |
| 132 | command = ['sudo', 'apt', '-y', 'install'] |
| 133 | elif distro == 'pacman': |
| 134 | aur_helper = get_archlinux_aur_helper() |
| 135 | command = [aur_helper, '-Sy', '--noconfirm', '--needed'] |
| 136 | elif distro == 'xbps': |
| 137 | command = ['sudo', 'xbps-install', '-Sy'] |
| 138 | elif which("pkg"): |
| 139 | command = ['doas', 'pkg', '-y', 'install'] |
| 140 | elif which("guix"): |
| 141 | command = ['guix', 'install'] |
| 142 | elif which("nix"): |
| 143 | command = ['nix', 'profile', 'install'] |
| 144 | elif which("zypper"): |
| 145 | command = ['sudo', 'zypper', 'install','-y'] |
| 146 | command.extend(deps_list) |
| 147 | try: |
| 148 | run_command(command) |
| 149 | except Exception as e: |
| 150 | print("Error: {}".format(e)) |
| 151 | install_failed_sys.append(' '.join(command)) |
| 152 | |
| 153 | def install_py_deps(deps_list): |
| 154 | if sys.prefix == sys.base_prefix: |
no test coverage detected