[Pythonmac-SIG] py2app: Bombing on unknown load command 27

Joel Gluck joelgluck at yahoo.com
Tue Jan 6 00:39:15 CET 2009


Chris, here's the setup script (which I run in my cwd, containing the  
main program I'm creating an app out of, "savi.py"). TIA for your  
diagnosis, doc! -- Joel

import os
from setuptools import setup

print os.system(r'sudo rm -rf mac_build mac_dist savi_log.txt')		

APP = ['savi.py']
DATA_FILES = ['../gameplay', 'data', 'en']
OPTIONS = {	'argv_emulation': True,
		"iconfile": "icons/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" )

print os.system(r'sudo rm -rf mac_dist/savi.app/Contents/Frameworks/ 
*.*')
print os.system(r'sudo cp -R mac_frameworks/*.* mac_dist/savi.app/ 
Contents/Frameworks')

A Couple of Notes on the Above:

1) The py2app "frameworks" option doesn't work for multiple items,  
which is why I end up copying the frameworks into the app manually at  
the end -- I keep a copy of them in a special folder...)

2) This script always bombs in setup() -- here's the error:
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()
Perhaps it never gets to delete the eggs because it bombs? Although I  
do tell Pdb to "cont" and it seems to exit normally... -- Joel




On Jan 5, 2009, at 6:14 PM, Christopher Barker wrote:

> Joel Gluck wrote:
>> Hi Chris,
>> One more related question on this -- when I run my setup script,  
>> the following 4 eggs appear in my cwd:
>> *altgraph-0.6.7-py2.5.egg*
>> *modulegraph-0.7-py2.5.egg*
>> *bdist_mpkg-0.4.3-py2.5.egg*
>> *macholib-1.1-py2.5.egg*
>> Why is this happening?
>
> those are the py2app dependencies -- why in the world you'd get them  
> in your cwd is beyond me.
>
> When you say "my setup script" -- do you mean your setup.py that is  
> supposed to build your app?
>
> post it, and we'll see if there is anything weird about it.
>
>> Is it safe to have my script just delete these when I'm done?
>
> I would think so, but I don't know why they are there at all.
>
>
> -CHB
>
> -- 
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090105/7ab5f73e/attachment.htm>


More information about the Pythonmac-SIG mailing list