Bindings: Use python version matching the found clang python module
Summary:
In case both python 2.7 and 3 are installed, but clang python bindings
are only installed for python 3, there will be no error message but
the self check will fail.
Check for clang bindings for both python2 and python3 (if installed),
and use the first one found to generate the sip bindings files.
Note, it is possible to e.g. use python2 to generate the sip binding
files (requires clang bindings), but generate bindings for python
2, 3, or both (requires matching python-devel and python-sip-devel
packages).
Test Plan:
install python3-clang bindings
install python2-clang bindings
or one of the above
the matching python version is used to run sip_generator.py
Reviewers: Frameworks, arojas
Reviewed By: arojas
Subscribers: kde-frameworks-devel, kde-buildsystem
Tags: Frameworks, Build System
Differential Revision: https://phabricator.kde.org/D14914