[PyQt] Odd inconsistent use of Qt mkspecs
woklist at kyngchaos.com
Sat Oct 30 19:02:38 BST 2010
I wanted to use a non-default mkspec on OS X. On OS X 10.6 the default GCC is 4.2, but I want to compile with 4.0, which is macx-g++40 in Qt-land.
First thing I noticed is that SIP uses its own set of mkspecs. Why not use mkspecs from Qt?
So, I duplicated SIP's macx-g++ mkspec as macx-g++40 and changed QMAKE_CC and QMAKE_CXX to the 4.0 versioned executables. Then I use configure -p option to set the mkspec for SIP to use. This all works fine.
On to PyQt. It starts out fine, but quickly drops back to using "g++". qpy is the only one that used "g++-4.0" for compilation (maybe it's getting CC/CXX from sipconfig? I couldn't figure this one out). All the libraries (frameworks) use "g++".
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? 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.
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."
"Don't you even hate 'em?"
"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."
<Ha, ha> "And it might give 'em all stomach ulcers."
- Tarzan, on war
More information about the PyQt