Skip to content

Commit 70bf67f

Browse files
committed
feat: install python/pip binaries for python3
1 parent 4cbbb57 commit 70bf67f

File tree

5 files changed

+46
-41
lines changed

5 files changed

+46
-41
lines changed

dist/node12/setup-cpp.js

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node12/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup-cpp.js

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/python/python.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ async function setupPythonSystem(setupDir: string, version: string) {
101101
}
102102
case "darwin": {
103103
installInfo = await setupBrewPack("python3", version)
104+
// add the python and pip binaries to the path
105+
const brewPythonPrefix = await execa("brew", ["--prefix", "python"], { stdio: "pipe" })
106+
const brewPythonBin = join(brewPythonPrefix.stdout, "libexec", "bin")
107+
await addPath(brewPythonBin)
108+
104109
break
105110
}
106111
case "linux": {
@@ -109,7 +114,7 @@ async function setupPythonSystem(setupDir: string, version: string) {
109114
} else if (hasDnf()) {
110115
installInfo = setupDnfPack("python3", version)
111116
} else if (isUbuntu()) {
112-
installInfo = await setupAptPack([{ name: "python3", version }])
117+
installInfo = await setupAptPack([{ name: "python3", version }, { name: "python-is-python3" }])
113118
} else {
114119
throw new Error("Unsupported linux distributions")
115120
}

0 commit comments

Comments
 (0)