mirror of
https://github.com/actions/setup-python
synced 2025-04-05 06:49:43 +00:00
fix: install PyPy on Linux ARM64 (#1011)
* ci: check non-eol versions of PyPy are available on all runners * fix: install PyPy on Linux ARM64 * ci: remove eol ubuntu-20.04
This commit is contained in:
15
dist/setup/index.js
vendored
15
dist/setup/index.js
vendored
@ -100062,28 +100062,33 @@ function pypyVersionToSemantic(versionSpec) {
|
||||
}
|
||||
exports.pypyVersionToSemantic = pypyVersionToSemantic;
|
||||
function isArchPresentForWindows(item, architecture) {
|
||||
architecture = replaceX32toX86(architecture);
|
||||
architecture = pypyArchitecture(architecture);
|
||||
return item.files.some((file) => utils_1.WINDOWS_PLATFORMS.includes(file.platform) && file.arch === architecture);
|
||||
}
|
||||
exports.isArchPresentForWindows = isArchPresentForWindows;
|
||||
function isArchPresentForMacOrLinux(item, architecture, platform) {
|
||||
architecture = pypyArchitecture(architecture);
|
||||
return item.files.some((file) => file.arch === architecture && file.platform === platform);
|
||||
}
|
||||
exports.isArchPresentForMacOrLinux = isArchPresentForMacOrLinux;
|
||||
function findAssetForWindows(releases, architecture) {
|
||||
architecture = replaceX32toX86(architecture);
|
||||
architecture = pypyArchitecture(architecture);
|
||||
return releases.files.find((item) => utils_1.WINDOWS_PLATFORMS.includes(item.platform) && item.arch === architecture);
|
||||
}
|
||||
exports.findAssetForWindows = findAssetForWindows;
|
||||
function findAssetForMacOrLinux(releases, architecture, platform) {
|
||||
architecture = pypyArchitecture(architecture);
|
||||
return releases.files.find((item) => item.arch === architecture && item.platform === platform);
|
||||
}
|
||||
exports.findAssetForMacOrLinux = findAssetForMacOrLinux;
|
||||
function replaceX32toX86(architecture) {
|
||||
// convert x32 to x86 because os.arch() returns x32 for 32-bit systems but PyPy releases json has x86 arch value.
|
||||
if (architecture === 'x32') {
|
||||
function pypyArchitecture(architecture) {
|
||||
if (utils_1.IS_WINDOWS && architecture === 'x32') {
|
||||
// convert x32 to x86 because os.arch() returns x32 for 32-bit systems but PyPy releases json has x86 arch value.
|
||||
architecture = 'x86';
|
||||
}
|
||||
else if (utils_1.IS_LINUX && architecture === 'arm64') {
|
||||
architecture = 'aarch64';
|
||||
}
|
||||
return architecture;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user