[pygtk] PyGTK with py2app
Shrihari Sankaran
gfxindia at gmail.com
Sun Oct 16 00:35:40 WST 2011
Hello,
I asked a similar question a few weeks back. Still, my problem is not solved
:(
So, I have installed PyGTK on my Mac using the all-in-one package:
http://www.daa.com.au/pipermail/pygtk/2011-March/019520.html
It has been installed at /opt/gtk
My app runs perfectly fine with "python my_app.py". But when I try to bundle
it using py2app, i get the following error.
Command used: "python setup.py py2app -A"
This does not report any error. But when I run the file, it says
"ImportError: No module named gtk"
If I bundle using "python setup.py py2app", I get the following errors:
Traceback (most recent call last):
>
> File "setup.py", line 22, in <module>
>
> setup_requires=['py2app'],
>
> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py",
>> line 152, in setup
>
> dist.run_commands()
>
> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",
>> line 953, in run_commands
>
> self.run_command(cmd)
>
> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",
>> line 972, in run_command
>
> cmd_obj.run()
>
> File
>> "/Library/Python/2.7/site-packages/py2app-0.6.3-py2.7.egg/py2app/build_app.py",
>> line 470, in run
>
> self._run()
>
> File
>> "/Library/Python/2.7/site-packages/py2app-0.6.3-py2.7.egg/py2app/build_app.py",
>> line 626, in _run
>
> self.run_normal()
>
> File
>> "/Library/Python/2.7/site-packages/py2app-0.6.3-py2.7.egg/py2app/build_app.py",
>> line 710, in run_normal
>
> self.create_binaries(py_files, pkgdirs, extensions, loader_files)
>
> File
>> "/Library/Python/2.7/site-packages/py2app-0.6.3-py2.7.egg/py2app/build_app.py",
>> line 842, in create_binaries
>
> platfiles = mm.run()
>
> File "build/bdist.macosx-10.7-intel/egg/macholib/MachOStandalone.py",
>> line 133, in run
>
> File "build/bdist.macosx-10.7-intel/egg/macholib/MachO.py", line 117, in
>> write
>
> File "build/bdist.macosx-10.7-intel/egg/macholib/MachO.py", line 312, in
>> write
>
> File "build/bdist.macosx-10.7-intel/egg/macholib/MachO.py", line 302, in
>> synchronize_size
>
> ValueError: New Mach-O header is too large to relocate
>
>
Now, I have a proper PyGTK app that runs perfectly fine. I need a way to
bundle it properly.
Thanks,
Shrihari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20111015/faa3f69c/attachment.html>
More information about the pygtk
mailing list