feat: install python/pip binaries for python3

This commit is contained in:
Amin Yahyaabadi 2023-07-04 12:30:06 -07:00
parent 4cbbb57e1f
commit 70bf67fc05
5 changed files with 46 additions and 41 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -101,6 +101,11 @@ async function setupPythonSystem(setupDir: string, version: string) {
}
case "darwin": {
installInfo = await setupBrewPack("python3", version)
// add the python and pip binaries to the path
const brewPythonPrefix = await execa("brew", ["--prefix", "python"], { stdio: "pipe" })
const brewPythonBin = join(brewPythonPrefix.stdout, "libexec", "bin")
await addPath(brewPythonBin)
break
}
case "linux": {
@ -109,7 +114,7 @@ async function setupPythonSystem(setupDir: string, version: string) {
} else if (hasDnf()) {
installInfo = setupDnfPack("python3", version)
} else if (isUbuntu()) {
installInfo = await setupAptPack([{ name: "python3", version }])
installInfo = await setupAptPack([{ name: "python3", version }, { name: "python-is-python3" }])
} else {
throw new Error("Unsupported linux distributions")
}