<div dir="ltr">Hi Luca,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 15 January 2018 at 08:24, Luca Beltrame <span dir="ltr"><<a href="mailto:lbeltrame@kde.org" target="_blank">lbeltrame@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Il giorno Sat, 13 Jan 2018 18:05:45 +0000<br>
Shaheed Haque <<a href="mailto:srhaque@theiet.org">srhaque@theiet.org</a>> ha scritto:<br>
<br>
Hello Shaheed,<br>
<br>
> 1. The packaging has advanced to the point where I think ECM-based<br>
<span class="gmail-">> framework-by-framework bindings are a real possibility, with both<br>
<br>
</span>That's absolutely fantastic. Thanks for the continued effort!<br></blockquote><div><br></div><div>It is a relief to get to this point after what, about 2 years? Also, a lot of credit has to go to the support of upstream (Wim, but also not forgettting Phil on the the SIP side of things). Still, it is not quite time to put out the bunting...</div> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> 4. For me, the jury is still out on PyQt versus a new set of<br>
<span class="gmail-">> cppyy-based Qt bindings. Clearly PyQt is solid and mature, but the<br>
<br>
</span>How do the bindings work? I suppose you'll need cppyy-based Qt to run<br>
your bindings, correct?<br></blockquote><div><br></div><div>Technically, there seem to be example in the wild of people (at CERN and possibly elsewhere?) creating applications with ROOT (the immediate precursor of cppyy) and PyQt. And since everything is, at one level, just Python, I don't see any bar to using PyQT. However, recall that I only went down the cppyy route after pouring a LOT of effort into the SIP route, and then concluding both the customisation effort and the limitations were too great for my liking. Basically, I expect it would take ongoing large-scale investment from somebody like me to keep the bindings going.<br></div><div><br></div><div>So, given the current cppyy Qt bindings required NO customisation effort (but see below) and should free us of the limitations of the SIP-generated approach, I'm putting my effort into the cppyy-based approach.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-">
> like finding a way to express the object ownership/destruction rules<br>
<br>
</span>How are you dealing with Python's GC? A major point (and PITA) when<br>
developing with PyQt and PyKDE4 was that a single slip in tracking<br>
objects meant the C++ object would get GC'd under your feet,<br>
causing crashes. This was particularly bad with the Plasma bindings<br>
because they would crash the whole desktop.<br></blockquote><div><br></div><div>As you will understand, there is no magic bullet for this. Both SIP and cppyy need to be told how to handle this. With SIP, part of the extensive customisation framework I created allowed me to say things like:</div><div><br></div><div>- for all constructors that match a set of regexps, and which have one argument called "parent" of type "QWidget *", declare that Python does not own the object</div><div><br></div><div>There is a similar capability in cppyy, and I just have to create a way to pass that hint. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-">
> benefit *for the bindings*, I'll drop P2. One possible such benefit<br>
<br>
</span>I don't mind either approach: FYI though, most major distros are<br>
phasing out Py2-as-default (Ubuntu, Arch, and openSUSE are the ones I'm<br>
aware of).<br>
<span class="gmail-"><br>
> minimal customisation (known as Pythonisations in cppyy parlance)<br>
> such as for #4 above, but nothing like the scale needed for SIP.<br>
<br>
</span>That would be great. It was one of the major issues when keeping PyKDE4<br>
up to date.<br></blockquote><div><br></div><div>Precisely. In marked contrast to SIP, I am hopeful that this ownership thingy may in fact be the ONLY customisation needed (though I/we need to think about Qt meta object stuff like signals/slots too).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-">
> look for help to get an ECM equivalent, possibly based on the same<br>
> approach but perhaps including CI and distribution via PyPi.<br>
<br>
</span>Can you link the repository with the tools?<br></blockquote><div><br></div><div>Not sure what you mean. It is all on PyPI (and bitbucket): <a href="https://pypi.python.org/pypi?%3Aaction=search&term=cppyy&submit=search">https://pypi.python.org/pypi?%3Aaction=search&term=cppyy&submit=search</a>.</div><div><br></div><div>Let me know if I missed your point.</div><div><br></div><div>Thanks, Shaheed<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-HOEnZb"><font color="#888888">
--<br>
Luca Beltrame, Ph.D.<br>
Translational Genomics Unit, Department of Oncology<br>
IRCCS Istituto di Ricerche Farmacologiche "Mario Negri"<br>
</font></span></blockquote></div><br></div></div></div>