(versions: Versions)
| 217 | |
| 218 | |
| 219 | def install_pythons(versions: Versions) -> None: |
| 220 | install_deadsnakes_versions(versions.deadsnakes_versions, uninstall=versions.uninstall_packages) |
| 221 | install_pyenv_versions(versions.pyenv_versions) |
| 222 | |
| 223 | default_python = shutil.which(versions.default_python_exe_name) |
| 224 | if default_python is None: |
| 225 | raise InstallError( |
| 226 | f"Expected default Python {versions.default_python_exe_name} does not exist" |
| 227 | ) |
| 228 | os.symlink(default_python, "/usr/bin/python") |
| 229 | |
| 230 | |
| 231 | class InstallError(Exception): |
no test coverage detected