[PyQt] Odd inconsistent use of Qt mkspecs

Phil Thompson phil at riverbankcomputing.com
Thu Nov 4 15:54:11 GMT 2010


On Sat, 30 Oct 2010 13:39:47 -0500, William Kyngesburye
<woklist at kyngchaos.com> wrote:
> On Oct 30, 2010, at 1:12 PM, Phil Thompson wrote:
> 
>>> First thing I noticed is that SIP uses its own set of mkspecs.  Why
not
>>> use mkspecs from Qt?
>> 
>> Because SIP is not specific to Qt.
>> 
> Does SIP *always* compile in the Qt config info, even if Qt is not
> installed?  Seems odd.
> 
> Or is the 'platform' value not specific to Qt, but happens to match Qt
> spec names when Qt was found?

Correct.

> As long as I understand this, then I can
> live with explicitly setting the spec for PyQt and hacking a custom spec
> for building SIP.
> 
>>> I traced it to configure.py, get_build_macros(), where it forces
>>> "macx-g++" for darwin and "default" for everything else.  Why doesn't
>> PyQt
>>> use the platform config value from SIP?
>> 
>> Because the default on Mac is to use XCode. Maybe a better thing to do
>> would be only force macx-g++ when the detected value is macx-xcode.
>> 
> The default for a long time with the binaries from Qt has been macx-g++.

> I even played around with compiling my own Qt recently (4.6.x) and the
> default was macx-g++.  I have some notes from compiling 4.1 and I didn't
do
> anything to change the default, and though I don't remember what that
> default was I probably would have noticed if it was macx-xcode.
> 
>>> Sure, I can set QMAKESPEC in the
>>> shell environment, but I was expecting PyQt to get everything from
SIP.
>>> 
>>> 
>>> I guess the SIP local mkspecs copy is the main problem.  Everything
else
>> I
>>> can work around with configuration and environment settings, but the
SIP
>>> mkspecs problem requires a hack.
>> 
>> Linux distros have a history of "improving" the spec files. PyQt should
>> be
>> built with the same compiler flags as Qt, which is why PyQt uses the
spec
>> files from Qt.
> 
> I meant, PyQt could get the *name* of the spec file to use from SIP, not
> *use* the spec file from SIP (which is not installed anyways).  If the
> 'platform' from SIP is the spec name.

PyQt gets everything (including the name of the spec file) from Qt - it's
the safest thing to do.

Phil


More information about the PyQt mailing list