[Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ?
Joel Gluck
joelgluck at yahoo.com
Sat Jan 3 16:57:02 CET 2009
Thanks, Bob -- and any idea why the frameworks are not adding as they
should?
One other question that should be easier to answer:
I located the py2app source code on my machine, and tried to slightly
modify it. How do I get my modified version to run when calling
"python setup.py py2app"? (without having to duplicate the entire
py2app package?)
-- Joel
On Jan 2, 2009, at 11:31 PM, Bob Ippolito wrote:
> Unknown load command: 27 means it's seeing a load command (low level
> Mach-O stuff) that it doesn't understand, which is reasonable because
> I don't think I've updated the code since 10.4 or so and there are
> probably some new ones.
>
> I only really worked on py2app, etc.when I was building Mac apps, and
> I haven't in a few years. I spend my open source time working on more
> server-side stuff.
>
> On Fri, Jan 2, 2009 at 8:17 PM, Joel Gluck <joelgluck at yahoo.com>
> wrote:
>> Hi Bob,
>> Thanks for pointing me to the right place -- I was able to replace
>> the
>> pygame icon with my own as a temporary fix.
>> I have two more questions (I know, you're not supporting py2app
>> anymore, but
>> you're basically the guru of this code so I thought I'd at least
>> try to go
>> directly to the source...!):
>> 1) My built .app is missing frameworks pygame depends on. I'm
>> trying to
>> include them by using py2app's "frameworks" option, but it doesn't
>> seem to
>> work as advertised -- no matter how many ways I devise to give it a
>> "comma-separated list of additional frameworks", it only adds the
>> first
>> framework in the list. (This is true whether from the command line
>> or within
>> the setup file as a py2app option.) Using the frameworks option
>> multiple
>> times does not seem to work. Is there a secret method? Currently
>> I'm doing:
>> APP = ['savi.py']
>> DATA_FILES = ['../gameplay', 'data', 'en']
>> OPTIONS = { 'argv_emulation': True,
>> "iconfile": "mac_savi_icon.icns",
>> "dist_dir":"mac_dist",
>> "bdist_base":"mac_build",
>> "frameworks": ["SDL_image.framework", "SDL_ttf.framework",
>> "SDL_mixer.framework", "SDL.framework"],
>> "includes":["Numeric"] }
>> setup( app=APP,
>> data_files=DATA_FILES,
>> options={'py2app': OPTIONS},
>> setup_requires=['py2app'],
>> version="0.2.3" )
>> 2) When I run "python setup.py py2app", it seems to run fine for a
>> while but
>> then hits a snag -- here's a traceback:
>> copying /Library/Frameworks/SDL.framework/Versions/A/SDL ->
>> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver
>> 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/Versions/A
>> linking /Users/joel/Documents/OT Video Games/SAVI Learning Tool
>> Prototype
>> ver 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/
>> Versions/Current
>> -> A
>> Traceback (most recent call last):
>> File
>> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6-
>> py2.5.egg/py2app/build_app.py",
>> line 548, in _run
>> self.run_normal()
>> File
>> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6-
>> py2.5.egg/py2app/build_app.py",
>> line 619, in run_normal
>> self.create_binaries(py_files, pkgdirs, extensions, loader_files)
>> File
>> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6-
>> py2.5.egg/py2app/build_app.py",
>> line 731, in create_binaries
>> mm.mm.run_file(fmwk)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py",
>> line 68,
>> in run_file
>> self.scan_node(m)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py",
>> line 91,
>> in scan_node
>> m = self.load_file(filename, caller=node)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py",
>> line 78,
>> in load_file
>> return self.load_file(newname, caller=caller)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py",
>> line 80,
>> in load_file
>> m = self.createNode(MachO, name)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/
>> MachOStandalone.py", line
>> 23, in createNode
>> res = super(FilteredMachOGraph, self).createNode(cls, name)
>> File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py",
>> line 148,
>> in createNode
>> m = cls(name, *args, **kw)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line
>> 61, in
>> __init__
>> self.load(file(filename, 'rb'))
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line
>> 71, in
>> load
>> self.load_fat(fh)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line
>> 82, in
>> load_fat
>> self.load_header(fh, arch.offset, arch.size)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line
>> 106, in
>> load_header
>> hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line
>> 146, in
>> __init__
>> self.load(fh)
>> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line
>> 178, in
>> load
>> raise ValueError("Unknown load command: %d" % (cmd_load.cmd,))
>> ValueError: Unknown load command: 27
>>> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype
>>> ver
>>> 2.3/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load()
>> (Pdb) cont
>> I've tried using the debugger to determine what's going on but it
>> remains a
>> mystery. (OTOH, if I type "cont", it immediately ends the script and
>> returns to the Unix prompt.) Any thoughts?
>> Thanks for any help you're willing to provide -- from your sunny
>> retirement
>> as py2app maintainer!
>> -- Joel, working desperately on a deadline...
>>
>>
More information about the Pythonmac-SIG
mailing list