(deps_list)
| 151 | install_failed_sys.append(' '.join(command)) |
| 152 | |
| 153 | def 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 | |
| 170 | def install_npm_gloal_deps(deps_list): |
| 171 | command = ["sudo", NPM_CMD, "install", "-g"] |
no test coverage detected