Skip to content

Commit 130062b

Browse files
committed
fix: use min versions instead of default versions
1 parent 67a5cc5 commit 130062b

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

dist/node12/setup-cpp.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node12/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup-cpp.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/python/python.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { setupDnfPack } from "../utils/setup/setupDnfPack"
1919
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
2020
import { isBinUptoDate } from "../utils/setup/version"
2121
import { unique } from "../utils/std"
22-
import { DefaultVersions } from "../versions/default_versions"
22+
import { MinVersions } from "../versions/default_versions"
2323
import { pathExists } from "path-exists"
2424

2525
export async function setupPython(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
@@ -128,14 +128,14 @@ async function findPython(binDir?: string) {
128128
if (binDir !== undefined) {
129129
if (
130130
(await pathExists(join(binDir, addExeExt(pythonBin)))) &&
131-
(await isBinUptoDate(pythonBin, DefaultVersions.python!))
131+
(await isBinUptoDate(pythonBin, MinVersions.python!))
132132
) {
133133
return pythonBin
134134
}
135135
}
136136
if (
137137
(await which(pythonBin, { nothrow: true })) !== null &&
138-
(await isBinUptoDate(pythonBin, DefaultVersions.python!))
138+
(await isBinUptoDate(pythonBin, MinVersions.python!))
139139
) {
140140
return pythonBin
141141
}
@@ -168,7 +168,7 @@ async function findPip() {
168168
await Promise.all(
169169
["pip3", "pip"].map(async (pip) => {
170170
try {
171-
if ((await which(pip, { nothrow: true })) !== null && (await isBinUptoDate(pip, DefaultVersions.pip!))) {
171+
if ((await which(pip, { nothrow: true })) !== null && (await isBinUptoDate(pip, MinVersions.pip!))) {
172172
return pip
173173
}
174174
} catch {

src/versions/default_versions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ export const DefaultVersions: Record<string, string | undefined> = {
2828
task: "3.25.0", // https://github.com/go-task/task/releases
2929
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/
3030
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
31+
}
32+
33+
export const MinVersions: Record<string, string | undefined> = {
3134
pip: "22.3.1",
32-
python: "3.8.0", // min version
35+
python: "3.8.0",
3336
}
3437

3538
/// If an ubuntu versions is not in this map:

0 commit comments

Comments
 (0)