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

Function install_py_deps

install-eaf.py:153–168  ·  view source on GitHub ↗
(deps_list)

Source from the content-addressed store, hash-verified

151 install_failed_sys.append(' '.join(command))
152
153def install_py_deps(deps_list):
154 if sys.prefix == sys.base_prefix:
155 # pass --break-system-packages to permit installing packages into EXTERNALLY-MANAGED Python installations. see https://github.com/pypa/pip/issues/11780
156 if get_distro() != "guix" and os.path.exists(os.path.join(sysconfig.get_path("stdlib", sysconfig.get_default_scheme() if hasattr(sysconfig, "get_default_scheme") else sysconfig._get_default_scheme()),"EXTERNALLY-MANAGED")):
157 command = PIP_CMD + ['install', '--user', '--break-system-packages', '-U']
158 else:
159 command = PIP_CMD + ['install', '--user', '-U']
160 else:
161 # if running on a virtual env, --user option is not valid.
162 command = PIP_CMD + ['install', '-U']
163 command.extend(deps_list)
164 try:
165 run_command(command)
166 except Exception as e:
167 print("Error:", e)
168 install_failed_pys.append(' '.join(command))
169
170def install_npm_gloal_deps(deps_list):
171 command = ["sudo", NPM_CMD, "install", "-g"]

Callers 2

install_core_depsFunction · 0.85
install_app_depsFunction · 0.85

Calls 2

get_distroFunction · 0.85
run_commandFunction · 0.70

Tested by

no test coverage detected