Instructions on how to build py2exe 0.6.8 (or an installer would benice, too!)

C

chardish

Hello,

I'm trying to build an executable with py2exe, but unfortunately the
version I have is 0.6.6, which has a rather annoying bug that doesn't
let you rename the executable file if you bundle everything in a
single executable. It seems fairly unacceptable to tell our customers
that they can't rename a file we send them.

I hear this problem is fixed in 0.6.8, but unfortunately there's no
standalone installer for py2exe 0.6.8 - the most recent version that
has an installer is 0.6.6 way back from 2006 (!). Is there a
standalone installer for py2exe 0.6.8 anywhere? If not, how do I build
it from source? (There's no instructions in the readme - it just says
"How to install: download the standalone installer" and doesn't
include building instructions.)

Cheers,
Evan
 
T

Thomas Heller

Hello,

I'm trying to build an executable with py2exe, but unfortunately the
version I have is 0.6.6, which has a rather annoying bug that doesn't
let you rename the executable file if you bundle everything in a
single executable. It seems fairly unacceptable to tell our customers
that they can't rename a file we send them.

I hear this problem is fixed in 0.6.8, but unfortunately there's no
standalone installer for py2exe 0.6.8 - the most recent version that
has an installer is 0.6.6 way back from 2006 (!). Is there a
standalone installer for py2exe 0.6.8 anywhere? If not, how do I build
it from source? (There's no instructions in the readme - it just says
"How to install: download the standalone installer" and doesn't
include building instructions.)

Easy - download the sources, and enter 'python setup.py bdist_wininst' in the
top-level directory. You need the same compiler that was used to build the
Python that you use.

Thomas
 
C

chardish

You need the same compiler that was used to build the
Python that you use.

Thanks for the tip. So if I downloaded a binary Python instead of
building it from sources, I'm out of luck?
 
M

Mike Driscoll

Hello,

I'm trying to build an executable with py2exe, but unfortunately the
version I have is 0.6.6, which has a rather annoying bug that doesn't
let you rename the executable file if you bundle everything in a
single executable. It seems fairly unacceptable to tell our customers
that they can't rename a file we send them.

I hear this problem is fixed in 0.6.8, but unfortunately there's no
standalone installer for py2exe 0.6.8 - the most recent version that
has an installer is 0.6.6 way back from 2006 (!). Is there a
standalone installer for py2exe 0.6.8 anywhere? If not, how do I build
it from source? (There's no instructions in the readme - it just says
"How to install: download the standalone installer" and doesn't
include building instructions.)

Cheers,
Evan

Maybe I'm missing something, but I can rename the executables I create
using py2exe 0.6.6 to anything I want after they're created.

Or are you talking about a Windows installer for the py2exe module
itself? Where are you finding this 0.6.8 version anyway? I can't find
it on www.py2exe.org

Anyway, what Thomas is talking about is that the only way to create a
usable installer of py2exe on Windows is to use the same compiler that
the Python you are using. As I understand it, Python 2.4 and 2.5 used
Visual Studio 2003. I think 2.3 used VS6. I have both, so I can try to
compile an installer for any of those versions if you can link me to
the source.

Mike

Python Extension Building Network: http:\\www.pythonlibrary.org
 
C

chardish

Maybe I'm missing something, but I can rename the executables I create
using py2exe 0.6.6 to anything I want after they're created.

Or are you talking about a Windows installer for the py2exe module
itself? Where are you finding this 0.6.8 version anyway? I can't find
it onwww.py2exe.org

Anyway, what Thomas is talking about is that the only way to create a
usable installer of py2exe on Windows is to use the same compiler that
the Python you are using. As I understand it, Python 2.4 and 2.5 used
Visual Studio 2003. I think 2.3 used VS6. I have both, so I can try to
compile an installer for any of those versions if you can link me to
the source.

Mike

Python Extension Building Network:     http:\\www.pythonlibrary.org

The issue with renaming executables only applies to single-file
executables, i.e. ones created with zipfile = None as an argument to
setup() and --bundle 1 as a command line argument. This is a known
issue as of 0.6.6: http://py2exe.org/index.cgi/ProblemsToBeFixed

I found sources for 0.6.8 on CVS at: http://sourceforge.net/cvs/?group_id=15583

A Windows installer for the 0.6.8 py2exe module would be ideal, but
somehow I doubt that's going to happen anytime soon since there hasn't
been a new installer since 2006. If you are willing to build that for
me (since I don't have VS) I'd really appreciate it : ) I'm using 32-
bit WinXP on this computer.
 
M

Mike Driscoll

The issue with renaming executables only applies to single-file
executables, i.e. ones created with zipfile = None as an argument to
setup() and --bundle 1 as a command line argument. This is a known
issue as of 0.6.6:http://py2exe.org/index.cgi/ProblemsToBeFixed


I'm using GUI2Exe to wrap my 0.6.6 version of py2exe. I use the bundle
into a single file option in it and have zipfile=None too. But maybe
one of my other switches is different.

I found sources for 0.6.8 on CVS at:http://sourceforge.net/cvs/?group_id=15583

A Windows installer for the 0.6.8 py2exe module would be ideal, but
somehow I doubt that's going to happen anytime soon since there hasn't
been a new installer since 2006. If you are willing to build that for
me (since I don't have VS) I'd really appreciate it : ) I'm using 32-
bit WinXP on this computer.


I finally figured out how to check out the code. I'm at work now,
where I only have VS2008 installed so I'll have to wait until I get
home this evening to try compiling it. I'll let you know if I have any
luck.
 
C

chardish

I'm using GUI2Exe to wrap my 0.6.6 version of py2exe. I use the bundle
into a single file option in it and have zipfile=None too. But maybe
one of my other switches is different.





I finally figured out how to check out the code. I'm at work now,
where I only have VS2008 installed so I'll have to wait until I get
home this evening to try compiling it. I'll let you know if I have any
luck.

Thanks, Mike. Hopefully you'll have more luck than I've had : )

Evan
 
G

GHUM

Evan,
I hear this problem is fixed in 0.6.8, but unfortunately there's no
standalone installer for py2exe 0.6.8 - the most recent version that

Maybe you can solve your problem via updating the build_exe.py after
installing py2exe 0.6.6

So:
a) use the 0.6.6 installer
b) update the build_exe.py from 0.6.8

Possible?

Best wishes,

Harald
 
M

Mike Driscoll

About every two weeks this "issue" pops up.  Question: Why is is so important to
package everything into a single file?  There are no Windows applications (that
I'm aware of) that ship as single files.  Many of them consist of hundreds and
in some cases 'thousands' of files.  Now if you want to DISTRIBUTE a single
setup.exe file, that makes sense to me.  Use py2exe without the single file
option and ship a setup.exe file created by Inno Installer.  Problem solved.
You will thank me when you want to include: registry entries, shortcuts,
documentation, configuration files, etc. in the distribution.

-Larry

Excellent point. I do include other files with my one exe using Inno
myself. Originally when I bundled it all in one, my reasoning was that
I needed to push it out to my organization and I figured pushing one
large files was better than pushing a bunch of small ones. Or
something like that.

In retrospect, that's a dumb reason as I have lots of automated Python
installers for things like Adobe Reader and Java and they basically
just do copy jobs.

Anyway, thanks for pointing that out.

Mike
 
M

Mike Driscoll

Evan,

Thanks, Mike. Hopefully you'll have more luck than I've had : )

Evan


I got it compiled. They are up on my website:

http://pythonlibrary.org/python_modules.htm

I tested it on one of my simple programs and it ran. I used the 2.5
version for that test. However, it should be noted that I haven't been
able to get the tests from CVS to run. The Traceback doesn't appear to
be py2exe related though. I'll post the issue to their group and see
if they have any idea why that would be.

In the meantime, feel free to give it a try. At worst you'll have to
delete the compiled binary and the py2exe folder.

Mike
 
C

chardish

Evan,

<snip>






I got it compiled. They are up on my website:

http://pythonlibrary.org/python_modules.htm

I tested it on one of my simple programs and it ran. I used the 2.5
version for that test. However, it should be noted that I haven't been
able to get the tests from CVS to run. The Traceback doesn't appear to
be py2exe related though. I'll post the issue to their group and see
if they have any idea why that would be.

In the meantime, feel free to give it a try. At worst you'll have to
delete the compiled binary and the py2exe folder.

Mike

Mike -

Thank you VERY much! py2exe installed fine and I now have a working
single-file executable that I can actually change the name of. Your
website looks useful in general; I'll store it away for the next time
I need to do Python programming on win32.

Larry - I'm of the philosophy that very simple tools (as opposed to
full applications) should not require installation, and if the tool is
so simple as to not even require saving configuration/preference files
(as mine is) it shouldn't even need its own directory. It should just
be a simple, convenient, portable executable. I like the OS X .app
file format (where the "application file" is merely a directory that
behaves differently by executing the main program when you double-
click it, instead of opening the directory) but it doesn't look like
that will be adapted on Windows anytime soon, so short of making
someone dump a bunch of inconvenient files someplace on their hard
drive, a single executable is the most prudent choice, IMHO.

Thanks, everyone, for your help!

Cheers,
Evan
 
M

Mike Driscoll

Mike -

Thank you VERY much! py2exe installed fine and I now have a working
single-file executable that I can actually change the name of. Your
website looks useful in general; I'll store it away for the next time
I need to do Python programming on win32.

If you think my site is useful, you'll love Tim Golden's win32 stuff:

http://timgolden.me.uk/python-on-windows/
http://timgolden.me.uk/python/index.html

I was going to do something like his Python on Windows site, but he
beat me to the punch, so I'll be trying to help him with my limited
knowledge.

This site is also interesting: http://www.lightbird.net/py-by-example/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top