[Eric] Eric4 as standalone app on Mac with py2app

Larry Shaffer larrys at dakotacarto.com
Tue Feb 2 21:18:02 GMT 2010


Hi Michael,

>From section 3.4 'Configuring SIP and PyQt for MacOS 10.6 (Snow Leopard)' of
the doc/pyqt4ref.html PyQt Reference Guide:

"When building SIP and PyQt on a 64 bit system they will be built, by
default, as x86_64 binaries.  However, again by default, Qt builds as i386
binaries. (Note that the default is expected to change in Qt v4.7.)  This
means that, using the default configuration, PyQt will not build on a 64 bit
system running MacOS 10.6 with a 32 bit build of Qt.  Instead you have to
make sure that SIP and PyQt are built as i386 binaries."

Looks like Phil Thompson is on top of the issue. More info is provided in
section (using --arch i386, etc). Sounds like Qt needs to be updated before
full 64-bit support is available. Even then, I'm not sure if the Mac needs
booted into 64-bit mode to utilize it as well.

I'm only running Leopard (not Snow), so I can't confirm that
qt-mac-cocoa-opensource-4.6.x.dmg won't work there. I still think it is not
the way to go for eric4 (if you try it and eric4 exhibits ampersands in the
menu names, you're not in luck).


Concerning eric4.py -> eric4.app

I tried to create a .app of eric4 using py2app, but have only got about half
way there. Your error with 'class ProxyBase(metaclass=ProxyType):' in
'PyQt4/uic/port_v3/proxy_base.py' was due to py2app running under Python
2.x.x and trying to work with Python 3 code. I stubbed 'port_v3' (archived
it, then deleted the folder), but am having issues with regular python
builtin modules not moving over to the .app structure. Looks like
modulegraph.py is not figuring it all out.

Will post my setup.py when I actually get somewhere useful. It's just an
exercise, since I think using eric4 via commandline launch works just fine,
and as expected, just not entirely Mac-like (still beats running under X11,
like Wingware). I also don't know how extensive debugging, like when
building plugins, will work with eirc4.app, since there needs to be multiple
'linked' instances eric4 running.

PyInstaller and py2app both seem to work for creating .app versions of the
standalone eric4 Tools (haven't built them all yet, though).

-- 
Larry


> From: Michael Hirschfeld <industrie13 at gmx.net>
> Date: Tue, 2 Feb 2010 21:17:18 +0100
> To: <eric at riverbankcomputing.com>, Larry Shaffer <larrys at dakotacarto.com>
> Subject: Re: [Eric] Eric4 as standalone app on Mac with py2app
> 
> Hi Larry,
> 
> thanks for the detailed help.
> Altough Eric worked so far with the install order on the webpage I wanted to
> build it the right way and started from zero again. This time I used, like
> recommended, the qt-mac-opensource-4.6.1.dmg, but this seems to cause trouble,
> at least when it comes to PyQt4, complaining about Qt4 not being 64bit:
> 
> In file included from
> /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,
>                  from
> /Library/Frameworks/QtCore.framework/Headers/QMetaType:1,
>                  from sipAPIQtCore.h:40,
>                  from sipQtCorecmodule.cpp:34:
> /Library/Frameworks/QtCore.framework/Headers/qglobal.h:288:2: error: #error
> "You are building a 64-bit application, but using a 32-bit version of Qt.
> Check your build configuration."
> make[1]: *** [sipQtCorecmodule.o] Error 1
> make: *** [all] Error 2
> 
> So could it be, that the cocoa-package is the only viable option under 10.6
> since 64bit is default here, or is it recommended to force PyQt to build in
> 32bit? 
> 
> 
> 
> 
> 




More information about the Eric mailing list