Repositories like qtwebengine and qtinterfaceframework might search for a Python interpreter earlier than _qt_internal_sbom_find_python is called and might find an older version of Python that is not sufficient for SBOM purposes. In that case Python3_EXECUTABLE would have been set, we would not try to look for Python 3.9 and then fail trying to find python dependencies or when executing one of the SBOM steps. Rework the lookup process to be contained in a function rather than a macro, make sure we temporarily reset any found python executable so far and explicitly look for Python 3.9 after which we cache it into custom cache var. This allows finding and using a Python interpreter for SBOM purposes, without interference from a possibly older version already found for a different purpose. Because the macro is now a function, we can get rid of some of the backup state management code. Task-number: QTBUG-122899 Change-Id: Ia846843a4e5cc8c91963ea76557639fc19e25913 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit e7bfdb976a2478c0d6d33cffa40b475ca106a28f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%