[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] py2exe



Hello, everyone!

Has anyone used py2exe with pygame games? I have managed to get it
working on sample programs/files, but am having trouble when using it
with anything pygame-related.  I read in several messages on the
py2exe mailing list archive that this is a common problem.

Does anyone have a sample setup.py script that they have successfully
used with a pygame application? I tried to use the sample on Pete
Shinners' py2exe tutorial page but a). i could not understand most of
what was going on in it, since it has a lot of "send this argument to
the command line" stuff going on, and b). I am trying not to use
sys.argv to pass options to py2exe, per py2exe's wiki, but instead
include options in the setup() call, like:

from distutils.core import setup
import py2exe
import sys

project_name = "The Big Test"
script = "hello.py"
extra_data = [(".", ["readme.txt"])]

setup(name=project_name, data_files=extra_data,
      options={"py2exe":{"dist_dir":"dist"}},
      console=[ {"script":script}])


I have not managed to get including packages/modules to work, or can't
find a straightforward example of it, but this is my sample script so
far. It'll find and auto-include modules like PIL, but with anything
pygame-related, it tells me that certain modules "appear to be
missing":

'AppKit', 'Foundation', 'Numeric', 'OpenGL.GL', 'objc', 'pygame.movie',
 'pygame.movieext', 'pygame.overlay'

have tried a handful of different ways but can't figure out how to
force it to include those, and thought someone here must have tried
this before and might have some examples.

Would appreciate any ideas/pointers you might have!

Thanks,
Denise