remove pypy input

This commit is contained in:
Dmitry Shibanov 2022-02-21 14:50:31 +03:00
parent 7f80679172
commit fe5cc5b5b4
3 changed files with 2 additions and 26 deletions

View file

@ -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');
});
}); });

8
dist/setup/index.js vendored
View file

@ -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()) {
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); return yield useCpythonVersion(version, architecture);
}
}); });
} }
exports.findPythonVersion = findPythonVersion; exports.findPythonVersion = findPythonVersion;

View file

@ -191,13 +191,5 @@ export async function findPythonVersion(
version: string, version: string,
architecture: string architecture: string
): Promise<InstalledVersion> { ): Promise<InstalledVersion> {
switch (version.toUpperCase()) {
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); return await useCpythonVersion(version, architecture);
}
} }