@@ -6445,7 +6445,7 @@ function installPython(workingDirectory) {
6445
6445
return __awaiter ( this , void 0 , void 0 , function * ( ) {
6446
6446
const options = {
6447
6447
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' ) } ) ) ,
6449
6449
silent : true ,
6450
6450
listeners : {
6451
6451
stdout : ( data ) => {
@@ -6718,7 +6718,7 @@ function binDir(installDir) {
6718
6718
// For example, PyPy 7.0 contains Python 2.7, 3.5, and 3.6-alpha.
6719
6719
// We only care about the Python version, so we don't use the PyPy version for the tool cache.
6720
6720
function usePyPy ( majorVersion , architecture ) {
6721
- const findPyPy = tc . find . bind ( undefined , 'PyPy' , majorVersion . toString ( ) ) ;
6721
+ const findPyPy = tc . find . bind ( undefined , 'PyPy' , majorVersion ) ;
6722
6722
let installDir = findPyPy ( architecture ) ;
6723
6723
if ( ! installDir && IS_WINDOWS ) {
6724
6724
// PyPy only precompiles binaries for x86, but the architecture parameter defaults to x64.
@@ -6765,7 +6765,9 @@ function useCpythonVersion(version, architecture) {
6765
6765
}
6766
6766
core . exportVariable ( 'pythonLocation' , installDir ) ;
6767
6767
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
+ : '' ;
6769
6771
const pyLibPath = path . join ( installDir , 'lib' ) ;
6770
6772
if ( ! libPath . split ( ':' ) . includes ( pyLibPath ) ) {
6771
6773
core . exportVariable ( 'LD_LIBRARY_PATH' , pyLibPath + libPath ) ;
@@ -6819,9 +6821,10 @@ function findPythonVersion(version, architecture) {
6819
6821
return __awaiter ( this , void 0 , void 0 , function * ( ) {
6820
6822
switch ( version . toUpperCase ( ) ) {
6821
6823
case 'PYPY2' :
6822
- return usePyPy ( 2 , architecture ) ;
6824
+ return usePyPy ( '2' , architecture ) ;
6823
6825
case 'PYPY3' :
6824
- return usePyPy ( 3 , architecture ) ;
6826
+ // keep pypy3 pointing to 3.6 for backward compatibility
6827
+ return usePyPy ( '3.6' , architecture ) ;
6825
6828
default :
6826
6829
return yield useCpythonVersion ( version , architecture ) ;
6827
6830
}
0 commit comments