From fe5cc5b5b44b6adc5b28c1b057b7ba575ccc897a Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 21 Feb 2022 14:50:31 +0300 Subject: [PATCH] remove pypy input --- __tests__/finder.test.ts | 8 -------- dist/setup/index.js | 10 +--------- src/find-python.ts | 10 +--------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/__tests__/finder.test.ts b/__tests__/finder.test.ts index 54bf3cf8..b6ade134 100644 --- a/__tests__/finder.test.ts +++ b/__tests__/finder.test.ts @@ -87,12 +87,4 @@ describe('Finder tests', () => { } 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'); - }); }); diff --git a/dist/setup/index.js b/dist/setup/index.js index a742d588..d8607004 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -57135,15 +57135,7 @@ function pythonVersionToSemantic(versionSpec) { exports.pythonVersionToSemantic = pythonVersionToSemantic; function findPythonVersion(version, architecture) { 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; diff --git a/src/find-python.ts b/src/find-python.ts index ff2a20d8..f0feed62 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -191,13 +191,5 @@ export async function findPythonVersion( version: string, architecture: string ): Promise { - 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); }