fix: skip downgrading pip in subsequent calls

This commit is contained in:
Amin Yahyaabadi 2022-02-13 19:37:24 -08:00
parent 69841cf764
commit 5980f76f4a
3 changed files with 7 additions and 6 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

@ -35,10 +35,11 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
tried = true tried = true
return setupPipPack(name, version) return setupPipPack(name, version)
} }
} if (process.platform === "win32") {
if (process.platform === "win32") { // downgrade pip on Windows
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005 // https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"], { stdio: "inherit" }) execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"], { stdio: "inherit" })
}
} }
execa.sync(python, ["-m", "pip", "install", version !== undefined && version !== "" ? `${name}==${version}` : name], { execa.sync(python, ["-m", "pip", "install", version !== undefined && version !== "" ? `${name}==${version}` : name], {