mirror of
https://github.com/actions/setup-python.git
synced 2025-07-02 23:53:47 +00:00
removed logs, added multiarch support for toolcache
This commit is contained in:
parent
401fc93a1b
commit
6767fd0bec
4 changed files with 55 additions and 35 deletions
11
dist/index.js
vendored
11
dist/index.js
vendored
|
@ -1133,7 +1133,9 @@ exports.findPyPyVersion = findPyPyVersion;
|
|||
function findPyPyToolCache(pythonVersion, pypyVersion, architecture) {
|
||||
let resolvedPyPyVersion = '';
|
||||
let resolvedPythonVersion = '';
|
||||
let installDir = tc.find('PyPy', pythonVersion, architecture);
|
||||
let installDir = utils_1.IS_WINDOWS
|
||||
? findPyPyInstallDirForWindows(pythonVersion)
|
||||
: tc.find('PyPy', pythonVersion, architecture);
|
||||
if (installDir) {
|
||||
// 'tc.find' finds tool based on Python version but we also need to check
|
||||
// whether PyPy version satisfies requested version.
|
||||
|
@ -1177,6 +1179,12 @@ function parsePyPyVersion(versionSpec) {
|
|||
};
|
||||
}
|
||||
exports.parsePyPyVersion = parsePyPyVersion;
|
||||
function findPyPyInstallDirForWindows(pythonVersion) {
|
||||
let installDir = '';
|
||||
utils_1.WINDOWS_ARCHS.forEach(architecture => (installDir = installDir || tc.find('PyPy', pythonVersion, architecture)));
|
||||
return installDir;
|
||||
}
|
||||
exports.findPyPyInstallDirForWindows = findPyPyInstallDirForWindows;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -2933,7 +2941,6 @@ function pypyVersionToSemantic(versionSpec) {
|
|||
}
|
||||
exports.pypyVersionToSemantic = pypyVersionToSemantic;
|
||||
function isArchPresentForWindows(item) {
|
||||
core.info(JSON.stringify(item));
|
||||
return item.files.some((file) => utils_1.WINDOWS_ARCHS.includes(file.arch) &&
|
||||
utils_1.WINDOWS_PLATFORMS.includes(file.platform));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue