mirror of https://github.com/aminya/setup-cpp
fix: use min versions instead of default versions
This commit is contained in:
parent
67a5cc536b
commit
130062b173
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -19,7 +19,7 @@ import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
|||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||
import { isBinUptoDate } from "../utils/setup/version"
|
||||
import { unique } from "../utils/std"
|
||||
import { DefaultVersions } from "../versions/default_versions"
|
||||
import { MinVersions } from "../versions/default_versions"
|
||||
import { pathExists } from "path-exists"
|
||||
|
||||
export async function setupPython(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
||||
|
@ -128,14 +128,14 @@ async function findPython(binDir?: string) {
|
|||
if (binDir !== undefined) {
|
||||
if (
|
||||
(await pathExists(join(binDir, addExeExt(pythonBin)))) &&
|
||||
(await isBinUptoDate(pythonBin, DefaultVersions.python!))
|
||||
(await isBinUptoDate(pythonBin, MinVersions.python!))
|
||||
) {
|
||||
return pythonBin
|
||||
}
|
||||
}
|
||||
if (
|
||||
(await which(pythonBin, { nothrow: true })) !== null &&
|
||||
(await isBinUptoDate(pythonBin, DefaultVersions.python!))
|
||||
(await isBinUptoDate(pythonBin, MinVersions.python!))
|
||||
) {
|
||||
return pythonBin
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ async function findPip() {
|
|||
await Promise.all(
|
||||
["pip3", "pip"].map(async (pip) => {
|
||||
try {
|
||||
if ((await which(pip, { nothrow: true })) !== null && (await isBinUptoDate(pip, DefaultVersions.pip!))) {
|
||||
if ((await which(pip, { nothrow: true })) !== null && (await isBinUptoDate(pip, MinVersions.pip!))) {
|
||||
return pip
|
||||
}
|
||||
} catch {
|
||||
|
|
|
@ -28,8 +28,11 @@ export const DefaultVersions: Record<string, string | undefined> = {
|
|||
task: "3.25.0", // https://github.com/go-task/task/releases
|
||||
doxygen: isArch() ? "1.9.6-1" : "1.9.7", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
|
||||
gcc: isArch() ? "13.1.1-1" : "13", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
||||
}
|
||||
|
||||
export const MinVersions: Record<string, string | undefined> = {
|
||||
pip: "22.3.1",
|
||||
python: "3.8.0", // min version
|
||||
python: "3.8.0",
|
||||
}
|
||||
|
||||
/// If an ubuntu versions is not in this map:
|
||||
|
|
Loading…
Reference in New Issue