mirror of https://github.com/aminya/setup-cpp
feat: install python/pip binaries for python3
This commit is contained in:
parent
4cbbb57e1f
commit
70bf67fc05
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
|
@ -101,6 +101,11 @@ async function setupPythonSystem(setupDir: string, version: string) {
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
installInfo = await setupBrewPack("python3", version)
|
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
|
break
|
||||||
}
|
}
|
||||||
case "linux": {
|
case "linux": {
|
||||||
|
@ -109,7 +114,7 @@ async function setupPythonSystem(setupDir: string, version: string) {
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
installInfo = setupDnfPack("python3", version)
|
installInfo = setupDnfPack("python3", version)
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
installInfo = await setupAptPack([{ name: "python3", version }])
|
installInfo = await setupAptPack([{ name: "python3", version }, { name: "python-is-python3" }])
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Unsupported linux distributions")
|
throw new Error("Unsupported linux distributions")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue