fix: install python3-pip on fedora

This commit is contained in:
Amin Yahyaabadi 2022-07-10 18:12:19 -07:00
parent 2eec158f5e
commit 3d6f9a38eb
6 changed files with 9 additions and 4 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

2
dist/setup_cpp.mjs 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

@ -61,6 +61,7 @@ export async function setupPythonViaSystem(
setupPacmanPack("python-pip") setupPacmanPack("python-pip")
} else if (hasDnf()) { } else if (hasDnf()) {
installInfo = setupDnfPack("python3", version) installInfo = setupDnfPack("python3", version)
setupDnfPack("python3-pip")
} else if (isUbuntu()) { } else if (isUbuntu()) {
installInfo = setupAptPack("python3", version) installInfo = setupAptPack("python3", version)
setupAptPack("python3-pip") setupAptPack("python3-pip")

View File

@ -13,6 +13,8 @@ import { setupAptPack } from "./setupAptPack"
import { setupPacmanPack } from "./setupPacmanPack" import { setupPacmanPack } from "./setupPacmanPack"
import { isArch } from "../env/isArch" import { isArch } from "../env/isArch"
import { isUbuntu } from "../env/isUbuntu" import { isUbuntu } from "../env/isUbuntu"
import { hasDnf } from "../env/hasDnf"
import { setupDnfPack } from "./setupDnfPack"
let python: string | undefined let python: string | undefined
let binDir: string | undefined let binDir: string | undefined
@ -47,6 +49,8 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
// ensure that pip is installed on Linux (happens when python is found but pip not installed) // ensure that pip is installed on Linux (happens when python is found but pip not installed)
if (isArch()) { if (isArch()) {
setupPacmanPack("python-pip") setupPacmanPack("python-pip")
} else if (hasDnf()) {
setupDnfPack("python3-pip")
} else if (isUbuntu()) { } else if (isUbuntu()) {
setupAptPack("python3-pip") setupAptPack("python3-pip")
} }