MCPcopy
hub / github.com/emacs-eaf/emacs-application-framework / install_sys_deps

Function install_sys_deps

install-eaf.py:124–151  ·  view source on GitHub ↗
(distro: str, deps_list)

Source from the content-addressed store, hash-verified

122 sys.exit(1)
123
124def 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
153def install_py_deps(deps_list):
154 if sys.prefix == sys.base_prefix:

Callers 2

install_core_depsFunction · 0.85
install_app_depsFunction · 0.85

Calls 3

prune_existing_sys_depsFunction · 0.85
get_archlinux_aur_helperFunction · 0.85
run_commandFunction · 0.70

Tested by

no test coverage detected