几周前,我能够使用 py2app 构建应用程序。我刚刚又试了一次,在构建过程中,我被转储到一个 pdb 会话中,下面的堆栈跟踪。
modulegraph.py 似乎存在导入问题,但我拥有最新版本。
即使使用 sys 之外没有导入的最小测试文件并使用 py2applet 创建的设置,也会发生这种情况。
我还确保我运行 py2app 的 python 是 /Library 版本,而不是 /System 版本。
有任何想法吗?
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 589, in _run
self.run_normal()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.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/Frameworks/Python.framework/Versions/2.6/lib/python2.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 180, in find_needed_modules
mf.import_hook(mod[:-2], None, ['*'])
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 472, in ensure_fromlist
fromlist.update(self.find_all_submodules(m))
File "build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py", line 496, in find_all_submodules
for (path, mode, typ) in ifilter(None, imap(moduleInfoForPath, names)):
NameError: global name 'ifilter' is not defined
> /Users/justin/Desktop/test/build/bdist.macosx-10.6-universal/egg/modulegraph/modulegraph.py(496)find_all_submodules()
-> for (path, mode, typ) in ifilter(None, imap(moduleInfoForPath, names)):