cmake: now using find_package(python3) from CMake to located python3
Fixes: #23922, #24252, #11103
This commit switches to use the find_package(Python3) introduced with
CMake 3.12.
This removes the need for a Zephyr backport of Python detection module.
The search order for Python3 is following CMake search order and can be
controlled through CMake flags (See CMake documentation).
Default it will use the Python version found in PATH.
If multiple Python3 versions are found in PATH, the newest version will
be selected (Can be controlled using `Python3_FIND_STRATEGY`)
Using find_package(Python3) also ensures Python2.7 will never be
selected, issue #11103, which was re-introduced in Zephyr.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2 files changed