mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
remove pypy input
This commit is contained in:
parent
7f80679172
commit
fe5cc5b5b4
3 changed files with 2 additions and 26 deletions
|
@ -87,12 +87,4 @@ describe('Finder tests', () => {
|
||||||
}
|
}
|
||||||
expect(thrown).toBeTruthy();
|
expect(thrown).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Finds PyPy if it is installed', async () => {
|
|
||||||
const pythonDir: string = path.join(toolDir, 'PyPy', '2.0.0', 'x64');
|
|
||||||
await io.mkdirP(pythonDir);
|
|
||||||
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
|
|
||||||
// This will throw if it doesn't find it in the cache (because no such version exists)
|
|
||||||
await finder.findPythonVersion('pypy2', 'x64');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
10
dist/setup/index.js
vendored
10
dist/setup/index.js
vendored
|
@ -57135,15 +57135,7 @@ function pythonVersionToSemantic(versionSpec) {
|
||||||
exports.pythonVersionToSemantic = pythonVersionToSemantic;
|
exports.pythonVersionToSemantic = pythonVersionToSemantic;
|
||||||
function findPythonVersion(version, architecture) {
|
function findPythonVersion(version, architecture) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
switch (version.toUpperCase()) {
|
return yield useCpythonVersion(version, architecture);
|
||||||
case 'PYPY2':
|
|
||||||
return usePyPy('2', architecture);
|
|
||||||
case 'PYPY3':
|
|
||||||
// keep pypy3 pointing to 3.6 for backward compatibility
|
|
||||||
return usePyPy('3.6', architecture);
|
|
||||||
default:
|
|
||||||
return yield useCpythonVersion(version, architecture);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.findPythonVersion = findPythonVersion;
|
exports.findPythonVersion = findPythonVersion;
|
||||||
|
|
|
@ -191,13 +191,5 @@ export async function findPythonVersion(
|
||||||
version: string,
|
version: string,
|
||||||
architecture: string
|
architecture: string
|
||||||
): Promise<InstalledVersion> {
|
): Promise<InstalledVersion> {
|
||||||
switch (version.toUpperCase()) {
|
return await useCpythonVersion(version, architecture);
|
||||||
case 'PYPY2':
|
|
||||||
return usePyPy('2', architecture);
|
|
||||||
case 'PYPY3':
|
|
||||||
// keep pypy3 pointing to 3.6 for backward compatibility
|
|
||||||
return usePyPy('3.6', architecture);
|
|
||||||
default:
|
|
||||||
return await useCpythonVersion(version, architecture);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue