Alexandru Croitor 803aae2f6c CMake: Rework Python interpreter finding for SBOM
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>
2024-06-26 16:49:28 +00:00
2024-02-29 15:35:57 +01:00
2015-08-18 19:59:14 +00:00
2024-06-20 12:51:27 +00:00
2024-02-02 15:23:02 +00:00
2024-04-24 19:02:09 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%