From: D. Hartley <denise.hartley@gm...> - 2005-09-19 00:51:21
I was very excited to read about the new "bundling" option in py2exe,
and am trying out a sample setup.py script to try and make it work. I
have looked on google and searched the archives on this mailing list
(as well as two others) for samples using this new command, and have
not found much (especially much that is beginner-user friendly!).
Which brings me to my first list question (and, I hope, a quick and
easy one). How do I format the bundling command in my options? Per
the py2exe wiki, I am not including options using argv, but rather in
the options keyword in the setup() call. My sample script is:
from distutils.core import setup
project_name =3D "The Big Test"
script =3D "hello.py"
extra_data =3D [(".", ["readme.txt"])]
This runs fine (well, it seems to), via a setup.bat I created
(c:\Python24\Python setup.py py2exe). However, I tried both 1 and 2
for bundle files, and both seem to give me a dist folder with a tcl
folder, an .exe, a library.zip, that MSVCR71.dll, my readme, and
w9xpopen.exe. Aren't I supposed to be seeing one "bundled" .exe?=20
There are significantly fewer files with either of these options than
were there before I did any bundling (it used to show all the .dll's
and .pyd's and so on), so it seems to be bundling... a little. (?) Is
this the expected outcome? Or am I really supposed to be able to get
it all to bundle into just one .exe file?
Perhaps I am using the wrong # for bundle_files=3D . I think I
remember reading that 3 is the default value for bundle_files
(unbundled, I'm guessing?) and I had also guessed that 1 bundles into
the zip and 2 bundles into the .exe.
If anyone has a clear explanation, I would greatly appreciate it!
Thanks so much.
From: D. Hartley <denise.hartley@gm...> - 2005-09-19 02:51:47
Also, I'm not sure why, but if:
build_files =3D 1
.. the resulting library.zip cannot be opened - I get an error that
says the .zip is "invalid or corrupted."
I don't get this error when I run setup.py with build_files=3D2.
Does anyone have any ideas why this would occur?
Does anybody know an alternative way to create a bundle (put all the =
librairies in the EXE file) than using the "--bundle" option? When I =
compile with this option, the EXE does not work in the end.
Also, any idea about how to put a directory of image files in my exe =
Thanks a lot for any help