@@ -6445,7 +6445,7 @@ function installPython(workingDirectory) {
64456445 return __awaiter ( this , void 0 , void 0 , function * ( ) {
64466446 const options = {
64476447 cwd : workingDirectory ,
6448- env : Object . assign ( Object . assign ( { } , process . env ) , IS_LINUX && { ' LD_LIBRARY_PATH' : path . join ( workingDirectory , 'lib' ) } ) ,
6448+ env : Object . assign ( Object . assign ( { } , process . env ) , ( IS_LINUX && { LD_LIBRARY_PATH : path . join ( workingDirectory , 'lib' ) } ) ) ,
64496449 silent : true ,
64506450 listeners : {
64516451 stdout : ( data ) => {
@@ -6718,7 +6718,7 @@ function binDir(installDir) {
67186718// For example, PyPy 7.0 contains Python 2.7, 3.5, and 3.6-alpha.
67196719// We only care about the Python version, so we don't use the PyPy version for the tool cache.
67206720function usePyPy ( majorVersion , architecture ) {
6721- const findPyPy = tc . find . bind ( undefined , 'PyPy' , majorVersion . toString ( ) ) ;
6721+ const findPyPy = tc . find . bind ( undefined , 'PyPy' , majorVersion ) ;
67226722 let installDir = findPyPy ( architecture ) ;
67236723 if ( ! installDir && IS_WINDOWS ) {
67246724 // PyPy only precompiles binaries for x86, but the architecture parameter defaults to x64.
@@ -6765,7 +6765,9 @@ function useCpythonVersion(version, architecture) {
67656765 }
67666766 core . exportVariable ( 'pythonLocation' , installDir ) ;
67676767 if ( IS_LINUX ) {
6768- const libPath = ( process . env . LD_LIBRARY_PATH ) ? `:${ process . env . LD_LIBRARY_PATH } ` : '' ;
6768+ const libPath = process . env . LD_LIBRARY_PATH
6769+ ? `:${ process . env . LD_LIBRARY_PATH } `
6770+ : '' ;
67696771 const pyLibPath = path . join ( installDir , 'lib' ) ;
67706772 if ( ! libPath . split ( ':' ) . includes ( pyLibPath ) ) {
67716773 core . exportVariable ( 'LD_LIBRARY_PATH' , pyLibPath + libPath ) ;
@@ -6819,9 +6821,10 @@ function findPythonVersion(version, architecture) {
68196821 return __awaiter ( this , void 0 , void 0 , function * ( ) {
68206822 switch ( version . toUpperCase ( ) ) {
68216823 case 'PYPY2' :
6822- return usePyPy ( 2 , architecture ) ;
6824+ return usePyPy ( '2' , architecture ) ;
68236825 case 'PYPY3' :
6824- return usePyPy ( 3 , architecture ) ;
6826+ // keep pypy3 pointing to 3.6 for backward compatibility
6827+ return usePyPy ( '3.6' , architecture ) ;
68256828 default :
68266829 return yield useCpythonVersion ( version , architecture ) ;
68276830 }
0 commit comments