[PyQt] PyQt on OSX Snow Leopard notes

Phil Thompson phil at riverbankcomputing.com
Fri Sep 11 14:57:47 BST 2009

On Fri, 4 Sep 2009 09:13:08 -0500, William Kyngesburye
<woklist at kyngchaos.com> wrote:
> For those trying this, here's what I found so far:
> - gcc compiles 64bit by default now, which will cause problems with  
> the 32bit-only Qt (unless you are using Qt Cocoa).  Configure SIP  
> universal so you get a 32bit SIP (the extra PPC code is harmless,  
> except that PyQt will take longer to compile and be larger than  
> necessary).  If you want 32bit-only or 32+64bit intel, you need to  
> edit siputils.py and change the unicflags and unilflags lines  
> appropriately.
> - the macx-g++ Qt mkspec is meant to run the current gcc version,  
> which is now 4.2.  But there is also a specifically macx-g++42  
> mkspec.  I figured macx-g++ should agree more with Qt, which was built  
> with gcc 4.0, so I edited it to run 4.0.  I don't know if it's really  
> a problem anywhere down the line.  Maybe there should be a macx-g++40  
> now.  But I don't know how to select a mkspec in the PyQt  
> configuration (I haven't looked).
> - the python 2.6 executable is 32+64bit now, and will run 64bit by  
> default. This is a problem with pyuic4, which is a shell script which  
> runs a python script (with pythonw).  At first I thought to use the  
> arch command in pyuic4 shell script to run pythonw in 32bit mode, but  
> apparently the arch command is broken and pythonw would still run  
> 64bit.  So I ended up creating a stripped copy of pythonw in /usr/ 
> local/bin with ditto:
> sudo ditto -arch i386 /usr/bin/pythonw2.6 /usr/local/bin/pythonw32
> and running that from the pyuic4 script.  If any of your PyQt-based  
> applications run from python, they'll have to use this also.  Unless,  
> of course, you use Qt Cocoa and compile PyQt 64bits.

Using Python v2.6.2 from python.org, and after recompiling Qt, then PyQt
builds as normal.

Until Qt properly supports Snow Leopard I think I'll leave things as they


More information about the PyQt mailing list