mirror of
https://github.com/actions/setup-python.git
synced 2026-01-19 19:38:56 +08: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
|
|
@ -2,6 +2,7 @@ import * as path from 'path';
|
|||
import * as pypyInstall from './install-pypy';
|
||||
import {
|
||||
IS_WINDOWS,
|
||||
WINDOWS_ARCHS,
|
||||
validateVersion,
|
||||
getPyPyVersionFromPath,
|
||||
readExactPyPyVersionFile,
|
||||
|
|
@ -67,7 +68,9 @@ export function findPyPyToolCache(
|
|||
) {
|
||||
let resolvedPyPyVersion = '';
|
||||
let resolvedPythonVersion = '';
|
||||
let installDir: string | null = tc.find('PyPy', pythonVersion, architecture);
|
||||
let installDir: string | null = 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
|
||||
|
|
@ -129,3 +132,14 @@ export function parsePyPyVersion(versionSpec: string): IPyPyVersionSpec {
|
|||
pythonVersion: pythonVersion
|
||||
};
|
||||
}
|
||||
|
||||
export function findPyPyInstallDirForWindows(pythonVersion: string): string {
|
||||
let installDir = '';
|
||||
|
||||
WINDOWS_ARCHS.forEach(
|
||||
architecture =>
|
||||
(installDir = installDir || tc.find('PyPy', pythonVersion, architecture))
|
||||
);
|
||||
|
||||
return installDir;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue