[PyQt] Generating PyQt bindings with Clang

Phil Thompson phil at riverbankcomputing.com
Thu May 19 17:49:33 BST 2016


On 19 May 2016, at 5:24 pm, Stephen Kelly <steveire at gmail.com> wrote:
> 
> On Thu, May 19, 2016 at 5:47 PM, Phil Thompson
> <phil at riverbankcomputing.com> wrote:
>> On 18 May 2016, at 10:50 pm, Stephen Kelly <steveire at gmail.com> wrote:
>>> 
>>> 
>>> In case you missed it, myself and Shaheed have been making progress on
>>> generating bindings for KDE Frameworks 5 using clang:
>>> 
>>> https://steveire.wordpress.com/2016/05/18/generating-python-bindings-with-clang/
>> 
>> In case you weren't aware PyQt .sip files are also derived from Clang (specifically CastXML).
> 
> Oh, I didn't know that. Is the tool you use FOSS/usable for KDE etc?

https://www.riverbankcomputing.com/hg/metasip/

I describe MetaSIP as a personal productivity tool and a work in progress. Unsurprisingly it fits the way I work - it may not fit how anybody else works.

From what I understand you want to be able to generate bindings automatically from the C++ .h files. I have never tried to be that ambitious. MetaSIP is a GUI tool that provides a lot of automated assistance to what is basically a manual process. Personally I think the only way to ensure quality in bindings (both in terms of Pythonic behaviour and bugs) is to check each argument of each function call. The key to it being manageable is to make sure you do that check once and once only.

Phil


More information about the PyQt mailing list