fix: ensure that pip is installed on linux

This commit is contained in:
Amin Yahyaabadi 2022-02-13 20:12:40 -08:00
parent 40212d6ffc
commit 1853202970
3 changed files with 6 additions and 2 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,7 @@ import { isBinUptoDate } from "./version"
import { join } from "path"
import { getVersion } from "../../default_versions"
import { InstallationInfo } from "./setupBin"
import { setupAptPack } from "./setupAptPack"
let python: string | undefined
let binDir: string | undefined
@ -39,6 +40,9 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
// downgrade pip on Windows
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"], { stdio: "inherit" })
} else if (process.platform === "linux") {
// ensure that pip is installed on Linux (happens when python is found but pip not installed)
await setupAptPack("python3-pip")
}
}