Refactor
This commit is contained in:
parent
de93cfa81c
commit
5d1b76c2b8
2 changed files with 10 additions and 4 deletions
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
|
@ -66565,8 +66565,11 @@ function pypyVersionToSemantic(versionSpec) {
|
||||||
}
|
}
|
||||||
exports.pypyVersionToSemantic = pypyVersionToSemantic;
|
exports.pypyVersionToSemantic = pypyVersionToSemantic;
|
||||||
function isArchPresentForWindows(item, architecture) {
|
function isArchPresentForWindows(item, architecture) {
|
||||||
return item.files.some((file) => file.arch === (architecture === 'x32' ? 'x86' : architecture) && // convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
// convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
||||||
utils_1.WINDOWS_PLATFORMS.includes(file.platform));
|
if (architecture === 'x32') {
|
||||||
|
architecture = 'x86';
|
||||||
|
}
|
||||||
|
return item.files.some((file) => file.arch === architecture && utils_1.WINDOWS_PLATFORMS.includes(file.platform));
|
||||||
}
|
}
|
||||||
exports.isArchPresentForWindows = isArchPresentForWindows;
|
exports.isArchPresentForWindows = isArchPresentForWindows;
|
||||||
function isArchPresentForMacOrLinux(item, architecture, platform) {
|
function isArchPresentForMacOrLinux(item, architecture, platform) {
|
||||||
|
|
|
@ -206,10 +206,13 @@ export function pypyVersionToSemantic(versionSpec: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isArchPresentForWindows(item: any, architecture: string) {
|
export function isArchPresentForWindows(item: any, architecture: string) {
|
||||||
|
// convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
||||||
|
if (architecture === 'x32') {
|
||||||
|
architecture = 'x86';
|
||||||
|
}
|
||||||
return item.files.some(
|
return item.files.some(
|
||||||
(file: any) =>
|
(file: any) =>
|
||||||
file.arch === (architecture === 'x32' ? 'x86' : architecture) && // convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
file.arch === architecture && WINDOWS_PLATFORMS.includes(file.platform)
|
||||||
WINDOWS_PLATFORMS.includes(file.platform)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue