PyQt6 and SIP v6 Snapshots Available

Phil Thompson phil at riverbankcomputing.com
Tue Dec 1 16:20:37 GMT 2020


On 01/12/2020 15:42, Florian Bruhin wrote:
> On Tue, Dec 01, 2020 at 12:52:43PM +0000, Phil Thompson wrote:
>> 
>> On 01/12/2020 12:34, Florian Bruhin wrote:
>> > On Tue, Dec 01, 2020 at 11:54:49AM +0000, Phil Thompson wrote:
>> > > On 01/12/2020 11:38, Phil Thompson wrote:
>> > > > On 01/12/2020 11:25, Florian Bruhin wrote:
>> > > > > On Tue, Nov 17, 2020 at 05:25:15PM +0000, Phil Thompson wrote:
>> > > > > > > I got my hands on an older snapshot and also tried the current one with
>> > > > > > > the Qt version check removed - but whatever I do, I get:
>> > > > > > >
>> > > > > > >   sip-build: 'sip-module' must be set
>> > > > > > >
>> > > > > > > https://www.riverbankcomputing.com/software/pyqt/download mentions:
>> > > > > > > "To build the sip module for PyQt6, run: sip-module --project PyQt6.sip"
>> > > > > > > but that doesn't actually work.
>> > > > > > >
>> > > > > > > Assuming that it should actually say "sip-module --project PyQt6-sip
>> > > > > > > PyQt6.sip", that doesn't show an error, but also doesn't seem to do
>> > > > > > > anything. I've tried running with --sdist and installing the resulting
>> > > > > > > sdist, but sip-build still gives me the same error. What am I missing?
>> > > > > >
>> > > > > > Are you using the latest SIP v6 and PyQt-builder snapshots?
>> > > > >
>> > > > > Sorry for the late answer - I just tried again with:
>> > > > >
>> > > > > - PyQt6 6.0.0.dev2011301320
>> > > > > - PyQt-builder 1.6.0
>> > > > > - sip 6.0.0.dev2011271026
>> > > > >
>> > > > > And I get:
>> > > > >
>> > > > >   Generating the QtCore bindings...
>> > > > >   sip-install:
>> > > > > .../PyQt6-6.0.0.dev2011301320/sip/QtCore/qnamespace.sip:53: /BaseType/
>> > > > > is only supported for ABI v13 and later
>> > > > >
>> > > > > Any idea what's going wrong there?
>> > > >
>> > > > Have you built the sip module according to...
>> > > >
>> > > > https://www.riverbankcomputing.com/software/pyqt/download
>> > >
>> > > Sorry, just realised those instructions are wrong. Now fixed.
>> > >
>> > > To install the PyQt6.sip module...
>> > >
>> > > sip-module --sdist PyQt6.sip
>> > > pip install PyQt6_sip-13.0.0.tar.gz
>> >
>> > I've done that now and I can successfully "import PyQt6.sip", but I
>> > still get the above error when running sip-install in the PyQt6 folder.
>> >
>> > Florian
>> 
>> I can't reproduce it using a fresh venv.
> 
> Whoops, it was my own fault and happened because of my patching trying
> to get it to build against Qt 5 - I hadn't realized that the Qt version
> would affect the PyQt module name, and that in turn would affect the 
> ABI
> version. Sorry for the noise!
> 
> In case anyone wants to try PyQt6 against Qt 5 still, the last version
> which seems to build properly is PyQt6-6.0.0.dev2010231559.
> I've attached the .tar.gz to this mail in case anyone else needs it.
> 
> However, I just realized this actually won't work like I'd like it to,
> because I can't seem to get PyQt6 running with PyQtWebEngine (5.15.2).
> 
> Is there some way I could modify PyQt5 (and PyQtWebEngine) so that
> unscoped enum access results in an error? This is the main thing I'd
> like to get ready before QtWebEngine is back with Qt 6.1 or .2, so I
> don't have to rush. It's certainly not impossible to try catching every
> enum access without having a way to test, but it'd be great if I had
> something I could run to make sure what's probably the biggest change 
> in
> the (Py)Qt 6 migration is taken care of.

If you look in siplib.c of the source of the PyQt5.sip module, find 
add_lazy_container_attrs(). Remove the loop starting with the comment...

/* Do the unscoped enum members. */

I think that should do what you want.

Phil


More information about the PyQt mailing list