@@ -63886,6 +63886,12 @@ function findPyPyVersion(versionSpec, architecture, updateEnvironment) {
63886
63886
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
63887
63887
if (updateEnvironment) {
63888
63888
core.exportVariable('pythonLocation', installDir);
63889
+ // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython
63890
+ core.exportVariable('Python_ROOT_DIR', installDir);
63891
+ // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2
63892
+ core.exportVariable('Python2_ROOT_DIR', installDir);
63893
+ // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3
63894
+ core.exportVariable('Python3_ROOT_DIR', installDir);
63889
63895
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
63890
63896
core.addPath(pythonLocation);
63891
63897
core.addPath(_binDir);
@@ -64042,12 +64048,29 @@ function useCpythonVersion(version, architecture, updateEnvironment) {
64042
64048
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
64043
64049
].join(os.EOL));
64044
64050
}
64051
+ if (utils_1.IS_LINUX) {
64052
+ const libPath = process.env.LD_LIBRARY_PATH
64053
+ ? `:${process.env.LD_LIBRARY_PATH}`
64054
+ : '';
64055
+ const pyLibPath = path.join(installDir, 'lib');
64056
+ if (!libPath.split(':').includes(pyLibPath)) {
64057
+ core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath);
64058
+ }
64059
+ }
64045
64060
const _binDir = binDir(installDir);
64046
64061
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
64047
64062
const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`);
64048
64063
if (updateEnvironment) {
64049
64064
core.exportVariable('pythonLocation', installDir);
64050
64065
core.exportVariable('PKG_CONFIG_PATH', installDir + '/lib/pkgconfig');
64066
+ core.exportVariable('pythonLocation', installDir);
64067
+ // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython
64068
+ core.exportVariable('Python_ROOT_DIR', installDir);
64069
+ // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2
64070
+ core.exportVariable('Python2_ROOT_DIR', installDir);
64071
+ // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3
64072
+ core.exportVariable('Python3_ROOT_DIR', installDir);
64073
+ core.exportVariable('PKG_CONFIG_PATH', installDir + '/lib/pkgconfig');
64051
64074
if (utils_1.IS_LINUX) {
64052
64075
const libPath = process.env.LD_LIBRARY_PATH
64053
64076
? `:${process.env.LD_LIBRARY_PATH}`
0 commit comments