Bindings: Use python version matching the found clang python module
ClosedPublic

Authored by bruns on Aug 17 2018, 11:08 PM.

Details

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

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Aug 17 2018, 11:08 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptAug 17 2018, 11:08 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Aug 17 2018, 11:08 PM
arojas accepted this revision.Aug 31 2018, 1:09 PM
This revision is now accepted and ready to land.Aug 31 2018, 1:09 PM
This revision was automatically updated to reflect the committed changes.