fix: downgrade pip on Windows to 21.3.1

https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
This commit is contained in:
Amin Yahyaabadi 2022-02-05 13:08:22 -08:00
parent c86ba684b1
commit 75259a989c
3 changed files with 13 additions and 5 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

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