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

Re: [pygame] Executable creation blues



I found the newer versions of py2exe to be very easy to use, and the
latest version seems to have fixed problems I had when I tried it
before (stuff with packaging pyOpenGL). Some packages are very large
(notably wxPython) but I highly recommend it as the only practical
method of distribution on windows.

I hate running python with command line args, so I made the script set
the args, so I could just run the script by itself (double click, or
from eclipse, whatever) in the same directory as the entry point
script. Below is my template I start with - I capitalized stuff I
change- let me know if when modified, it doesn't work for you
-----------------------------------
from distutils.core import setup
import py2exe
import sys

data_file_list = ["YOURDATA.EXT", "FILEHERE.EXT"]

sys.argv[1:] = ["py2exe", "-O0", "-b", "1"]
setup(
   version = "0.1.0",
   description = "YOUR DESCRIPTION",
   name = "YOUR TITLE",
   options={"py2exe":{"optimize":2}},
   data_files=file_dir_list,
   windows = ["ENTRY_POINT.py"]
   )

----------------


On 9/26/06, Jasper <jasper@xxxxxxxx> wrote:
I've been mucking around with creating executables so that I don't have
to ship python in order for people to play my game, and am having a
disheartening amount of trouble sorting out what should be a basic step.

which basic step is that?


Is there anything else worth trying?  Am I stuck fiddling with py2exe,
or rolling my own solution?

You're not stuck fiddling with py2exe if you get it to work... don't
despair, there's a lot of good work there you can make use of, and I'm
sure it can work for you

if your problem is with a specifc module, you might find some help
with the issue here:
http://www.py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules


I'm beginning to seriously consider shipping Python, half a dozen
libraries, and .pyc files as a possible improvement. :-/

well not to put a too blunt point on it... but that's exactly what py2exe does.