[Eric] Eric4 as standalone app on Mac with py2app
Michael Hirschfeld
industrie13 at gmx.net
Tue Jan 26 19:28:52 GMT 2010
Hi,
I successfully installed Eric 4.4.0 on my Mac, running Snow Leopard with stock python (Qt 4.6, Sip 4.10, PyQt 4.7, QScintilla 2.4.2) using this http://works13.com/blog/mac/installing-eric4-on-mac-os-x-leopard.htm little HowTo.
However, since I don't find it very convenient to open Eric every time via Terminal and have to let this one open too, I tried to build a standalone app of it with py2app. This is where I get in trouble and would be glad to get any hints.
What did I do?
Eric is installed in /Library/Python/2.6/site-packages/eric4, so I placed a 'setup.py' inside this directory and did a
sudo python setup.py py2app
All I get, is an empty build directory and a error.
My setup.py:
------------------------------------
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['eric4.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True,
'semi_standalone':'False',
'includes': 'Qt4,sip,PyQt4,QScintilla2',
'packages':('Qt4','sip','PyQt4','QScintilla2'),
'site_packages': 'True'}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
------------------------------------
Terminal output:
eugenie:eric4 industrie13$ sudo python setup.py py2app
Password:
running py2app
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 589, in _run
self.run_normal()
File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 641, in run_normal
mf = self.get_modulefinder()
File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 549, in get_modulefinder
debug=debug,
File "build/bdist.macosx-10.6-universal/egg/modulegraph/find_modules.py", line 255, in find_modules
find_needed_modules(mf, scripts, includes, packages)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/find_modules.py", line 176, in find_needed_modules
mf.run_script(path)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 389, in run_script
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 658, in scan_code
self.scan_code(c, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 560, in _safe_import_hook
mods = self.import_hook(name, caller)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 401, in import_hook
m = self.load_tail(q, tail)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 461, in load_tail
m = self.import_module(head, mname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 553, in load_module
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 560, in _safe_import_hook
mods = self.import_hook(name, caller)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 401, in import_hook
m = self.load_tail(q, tail)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 461, in load_tail
m = self.import_module(head, mname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 553, in load_module
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 560, in _safe_import_hook
mods = self.import_hook(name, caller)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 401, in import_hook
m = self.load_tail(q, tail)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 461, in load_tail
m = self.import_module(head, mname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 553, in load_module
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 658, in scan_code
self.scan_code(c, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 560, in _safe_import_hook
mods = self.import_hook(name, caller)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 401, in import_hook
m = self.load_tail(q, tail)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 461, in load_tail
m = self.import_module(head, mname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 528, in load_module
m = self.load_package(fqname, pathname)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 678, in load_package
self.load_module(fqname, fp, buf, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 553, in load_module
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 584, in _safe_import_hook
sm = self.import_hook(name, caller, [sub])
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 404, in import_hook
modules.update(self.ensure_fromlist(m, fromlist))
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 478, in ensure_fromlist
submod = self.import_module(sub, fullname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 553, in load_module
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 584, in _safe_import_hook
sm = self.import_hook(name, caller, [sub])
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 404, in import_hook
modules.update(self.ensure_fromlist(m, fromlist))
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 478, in ensure_fromlist
submod = self.import_module(sub, fullname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 553, in load_module
self.scan_code(co, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 630, in scan_code
self._safe_import_hook(name, m, fromlist)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 560, in _safe_import_hook
mods = self.import_hook(name, caller)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 401, in import_hook
m = self.load_tail(q, tail)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 461, in load_tail
m = self.import_module(head, mname, m)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 518, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 532, in load_module
co = compile(fp.read() + '\n', pathname, 'exec')
File "/Library/Python/2.6/site-packages/PyQt4/uic/port_v3/proxy_base.py", line 4
class ProxyBase(metaclass=ProxyType):
^
SyntaxError: invalid syntax
> /Users/industrie13/Downloads/site-packages/eric4/build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py(532)load_module()
(Pdb)
------------------------------------
Any hints or tips?
Did anyone from this list managed to build Eric as a standalone app on Mac? And if yes, how did you do?
Michael
More information about the Eric
mailing list