@@ -63886,6 +63886,12 @@ function findPyPyVersion(versionSpec, architecture, updateEnvironment) {
6388663886 const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
6388763887 if (updateEnvironment) {
6388863888 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);
6388963895 core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
6389063896 core.addPath(pythonLocation);
6389163897 core.addPath(_binDir);
@@ -64042,12 +64048,29 @@ function useCpythonVersion(version, architecture, updateEnvironment) {
6404264048 `The list of all available versions can be found here: ${installer.MANIFEST_URL}`
6404364049 ].join(os.EOL));
6404464050 }
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+ }
6404564060 const _binDir = binDir(installDir);
6404664061 const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
6404764062 const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`);
6404864063 if (updateEnvironment) {
6404964064 core.exportVariable('pythonLocation', installDir);
6405064065 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');
6405164074 if (utils_1.IS_LINUX) {
6405264075 const libPath = process.env.LD_LIBRARY_PATH
6405364076 ? `:${process.env.LD_LIBRARY_PATH}`
0 commit comments