[Pythonmac-SIG] Problem with pygame and py2app
David Hill
davidh at digitalfish.com
Tue Jan 2 20:13:50 CET 2007
Hi,
I've been working on a small pygame app and I've just now started
trying to build a Mac OS X application bundle out of it.
When I run "python setup.py py2app" with no additional options, I get
a verbose set of output ending with:
> linking /Volumes/Storage/Users/davidh/Documents/workspace/Haul/src/
> dist/Haul.app/Contents/Frameworks/SDL.framework/Versions/Current -> A
> Thinning /Volumes/Storage/Users/davidh/Documents/workspace/Haul/src/
> dist/Haul.app/Contents/Frameworks/SDL_image.framework/Versions/A/
> SDL_image to ppc, i386
> /usr/bin/lipo: -extract ppc specified but fat file: /Volumes/
> Storage/Users/davidh/Documents/workspace/Haul/src/dist/Haul.app/
> Contents/Frameworks/SDL_image.framework/Versions/A/SDL_image does
> not contain that architecture
> Traceback (most recent call last):
> File "setup.py", line 25, in ?
> app=[
> File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
> python2.4/distutils/core.py", line 149, in setup
> dist.run_commands()
> File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
> python2.4/distutils/dist.py", line 946, in run_commands
> self.run_command(cmd)
> File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
> python2.4/distutils/dist.py", line 966, in run_command
> cmd_obj.run()
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Py2App/py2app/build_app.py", line 389, in run
> self._run()
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Py2App/py2app/build_app.py", line 510, in _run
> self.run_normal()
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Py2App/py2app/build_app.py", line 570, in
> run_normal
> self.create_binaries(py_files, pkgdirs, extensions, loader_files)
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Py2App/py2app/build_app.py", line 672, in
> create_binaries
> platfiles = mm.run()
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Py2App/macholib/MachOStandalone.py", line
> 153, in run
> thin_to_archs(filename, nodearchs)
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Py2App/macholib/util.py", line 146, in
> thin_to_archs
> raise ValueError, 'Error %d returned by: %s' % (retval, ''.join
> (["'%s'" % arg for arg in command]))
> ValueError: Error 1 returned by: '/usr/bin/lipo''/Volumes/Storage/
> Users/davidh/Documents/workspace/Haul/src/dist/Haul.app/Contents/
> Frameworks/SDL_image.framework/Versions/A/SDL_image''-output''/tmp/
> tmp1vFdMt''-extract''ppc''-extract''i386'
The main problem seems to be that SDL_image doesn't contain the ppc
architecture. If I run "file <path to SDL_image>" I get the following:
> /Volumes/Storage/Users/davidh/Documents/workspace/Haul/src/dist/
> Haul.app/Contents/Frameworks/SDL_image.framework/Versions/A/
> SDL_image: Mach-O universal binary with 2 architectures
> /Volumes/Storage/Users/davidh/Documents/workspace/Haul/src/dist/
> Haul.app/Contents/Frameworks/SDL_image.framework/Versions/A/
> SDL_image (for architecture i386): Mach-O dynamically linked
> shared library ppc
> /Volumes/Storage/Users/davidh/Documents/workspace/Haul/src/dist/
> Haul.app/Contents/Frameworks/SDL_image.framework/Versions/A/
> SDL_image (for architecture cputype (0) cpusubtype (0)): Mach-O
> universal binary with 2 architectures
which seems very strange to me. If it has two architectures, I would
have expected ppc and i386, not "cputype (0) cpusubtype (0)" as it
says above. Did I somehow get my SDL installation messed up? I seem
to have installed python 2.4.4, pyobjc 1.4, and pygame-1.8.0pre-
py2.4. Perhaps that pre-py2.4 is my problem?
I'm running on a Mac Pro with 10.4.8 and I'd like to be able to build
a universal .app for this project. If it is necessary to reinstall
python, pygame, pyobjc, and SDL, which versions should I use? Every
time I look for the most recent matching versions, I seem to find
python 2.5 but no associated pygame or pyobjc. I'm also unsure as to
whether or not it is healthy to move on to python 2.5 if nothing else
has been rebuilt yet.
Please help! What should I have installed on my Mac Pro to develop on
10.4.8 and build universal binaries? I'm not using any python 2.5
specific features yet but I wouldn't mind moving in that direction
eventually.
Thanks,
Dave
More information about the Pythonmac-SIG
mailing list