MCPcopy
hub / github.com/pex-tool/pex / install_pythons

Function install_pythons

docker/base/install-pythons.py:219–228  ·  view source on GitHub ↗
(versions: Versions)

Source from the content-addressed store, hash-verified

217
218
219def 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
231class InstallError(Exception):

Callers 1

mainFunction · 0.85

Calls 4

install_pyenv_versionsFunction · 0.85
InstallErrorClass · 0.85
symlinkMethod · 0.80

Tested by

no test coverage detected