[PyQt] Having multiple SIP installations

Phil Thompson phil at riverbankcomputing.com
Tue Apr 15 17:27:31 BST 2014


On 11-04-2014 5:20 am, Kovid Goyal wrote:
> Hi Phil,
>
> I have been investigating porting calibre to PyQt5/Qt5 and in order 
> to
> do that I needed to have a custom PyQt5/SIP build on my system 
> alongside
> the distribution provided one.
>
> My requirements are that I need to use:
> 1) The system python interpreter
> 2) A custom compiled Qt5, SIP and PyQt5. The custom SIP version is
> different from the system SIP version.
>
> The problem is that the configure script for PyQt5 places the python
> include dir before the sip include dir which causes the system sip.h 
> to
> be used, breaking the build. The relevant lines in configure.py are
>
>     if target_config.py_inc_dir != target_config.sip_inc_dir:
>         pro_lines.append('INCLUDEPATH += %s' % 
> target_config.sip_inc_dir)
>
> I can obviously patch it myself to do what I need, but I think it 
> should
> be changed to place the sip include dir before the python include 
> dir,
> if they differ. So the lines should be:
>
>     if target_config.py_inc_dir != target_config.sip_inc_dir:
>         pro_lines.insert(len(pro_lines)-1, 'INCLUDEPATH += %s' %
> target_config.sip_inc_dir)
>
> As far as I can see, this is the only way to build PyQt5 successfully
> using the system python interpreter and a custom SIP, when the custom
> SIP and the system SIP are of different versions.
>
> There may of course be other side effects that I do not realize.
>
> Thanks,
>
> Kovid.

Done.

Out of interest why to do you need custom builds?

Phil


More information about the PyQt mailing list