[PyKDE] Dependency on sip.pyd

Phil Thompson phil at riverbankcomputing.co.uk
Fri Nov 10 19:01:35 GMT 2006


On Wednesday 08 November 2006 5:07 pm, Giovanni Bajo wrote:
> Hello,
>
> I happen to waste a lot of time dealing with sip.pyd binary dependency and
> binary compatibility between different SIP versions.
>
> Our local policy is to use a different PyQt/Qt version *per-project* (so
> that each project can upgrade Qt separately and indepently). This means
> that I have many different PyQt versions (3.x and 4.x) and a miriad of
> sip.exe/sip.pyd files around. I keep all these .pyd files within a
> site-package directory *local* in each project, but still it is a big mess.
>
> Now, I don't want to bore you with this mess, and I'm sure that moving to
> an egg-based distribution is the final way to go (so that you can simply
> use pkg_resources.require("sip==4.5,pyqt==3.15") and everything will work),
> but I think that a single point of failure that could be optimized out by
> *NOT* having any sip.pyd binary around.
>
> Is it possible to add an option so that modules built with SIP do *not*
> require sip.pyd (and instead link all the required code directly within the
> module)? This will also allow us to mixmatch binary modules that were
> produced with different versions of SIP, without the need of recompiling
> them all when SIP is upgraded.
>
> [I understand that having sip.pyd shared across qt*.pyd is actually
> required -- but I already compile all the modules together in a single
> qt.pyd file; and I have many other SIP extensions which *do not* need to
> share the same objmap or whatever with pyqt].

Sorry, I don't think I understand what you mean.

sip.pyd is a Python extension module - it is not a library and it is not 
linked against. You can build it statically and have it built in to your 
Python interpreter - same for PyQt (though I don't test this). So you could 
create a project specific interpreter.

Phil




More information about the PyQt mailing list