Instead of adding these imports in the code, you should rather explicitely say py2exe to include required modules (or packages).

For example, here is the py2exe script i used when i packaged slune-1.0.7 for Windows:

# build.py
# use : python build.py py2exe
from distutils.core import setup
import glob
import py2exe

setup(windows=[{"script":"slune","icon_resources":[(1,"images\\slune.ico")]}],
      data_files=[("images",glob.glob("images\\*.*")),
                  ("shapes",glob.glob("shapes\\*.*")),
                  ("worlds",glob.glob("worlds\\*.*")),
                  ("sounds",glob.glob("sounds\\*.*")),
                  ("materials",glob.glob("materials\\*.*"))],
     
      options = {"py2exe": {"packages"  :["encodings"],
                            "excludes"  :["Tkinter","tcl"],
                            "includes"  :["soya","sets"],
                            "optimize"  :2,
                            "compressed":0}},
      )
###

If you have problems with PIL (problem that i never had), you should add it to the include list (or package).

Regards,

Thomas

Michael Edwards a écrit :
Wow!  I thought I'd figured out how to max it out, but, apparently, I
was wrong.  Just for the sake of analyzing the results, let me know what
your control settings are next time you get a score like that--I'm
definitely going to have to revise my hypothesis.

Also, I have a binary version built for windows with py2exe here:
http://workingweek.org/apps/ktpf-0.6.1_win.zip

It shouldn't even require python to run.  If anyone feels like trying
that out, let me know what you think.

By the way, when using py2exe, I found that I had to add these lines
somewhere within my modules in order for it to grab the right .dlls for
Soya:

import PIL.Image
import PIL.PngImagePlugin
import sets

I assume if you're using textures other than in PNG format, you'll need
a different plugin module.  Also, for some reason, py2exe needed the new
sets module in Python 2.4 called explicitly.  Not sure why, but
including that let me run ktpf as an exe.

-Mike

On Tue, 2006-01-31 at 06:54 +0100, Henning Hasemann wrote:
  
My personal high score is over 600.  Let me know what you think and how
well you do.
      
Nice one!
Without playing the controls I get over 1300 but I have no more time this
morning ,-)

  Henning


_______________________________________________
Soya-user mailing list
[EMAIL PROTECTED]
https://mail.gna.org/listinfo/soya-user
    


_______________________________________________
Soya-user mailing list
[EMAIL PROTECTED]
https://mail.gna.org/listinfo/soya-user


  

Reply via email to