Jimmy Retzlaff wrote:
Fuzzyman wrote:
Sent: Wednesday, December 28, 2005 4:55 AM
To: py2exe-users@lists.sourceforge.net
Subject: [Py2exe-users] py2exe from py2exe

Hello all (Jimmy especially),

This is a weird question - but I'm asking anyway. I'll probably have
do some digging around, but Jimmy may have some useful information to
help me.

I've nearly finished the new version of Movable Python -

It's a *massive* improvement on the previous versions. It provides a
frozen distribution of Python, that runs programs as if they were run
the normal Python distribution. It has a nice GUI which is a program
launcher, with lots of options to configure the way it behaves. (For
example you can turn psyco on for *all* programs - you have four quick
launch buttons to launch common applications, you can provide command
line arguments via the GUI, and lots more).

I'd like to know if there are any conceptual reasons why py2exe
shouldn't itself run under a py2exe program (which is what Movable
Python is).


Hello Jimmy,

Sorry for the late reply. Thanks for your efforts here.

That IS a new one...

py2exe is pretty good about finding the files that it needs to bundle.
The main issue is that it will find many of them (the pyc/pyo files at
least) in an archive (zip or exe) and py2exe doesn't know how to copy
files from there.

I'd not considered that - obvious really.

It doesn't sound like modules in the exe kill this as an idea - from your experiments below.

At some point down the road I hope to have support for Python Eggs
(including zip files) and that might help with this.

But there is hope for the short term as well. The CVS version of py2exe
(which will hopefully be released soon) has a new bundle option (4)
which puts the pyc/pyo files directly in the file system instead of an
archive. This would allow py2exe to find and copy the needed files.

Right - interesting.

This would need a special version of Movable Python. I currently *don't* compress library.zip because of speed issues. *However* (as you note) storing all the pyc files separately takes up a lot of extra space on the windows file system.

[code etc snipped...]
In this example metasetup.py builds the py2exe script setup.py. Notice
the modules, packages, and data files that need to be explicitly
included (maybe you are already including everything when you build
Movable Python?). In any event, this produces setup.exe along with lots
of other files (thanks to the bundle option of 4 from the CVS version of
py2exe). I then copied test.py into setup.exe's directory and run
"setup.exe py2exe" and it produces a working test.exe.

If Movable Python is using archives, then moving to bundle_files=4 will
cause a huge increase in the number of files. The setup.exe example
above has over 500 files. I don't know if that is an issue for you or
not. It can be a space concern as even the smallest files consume at
least 4KB each in Windows file systems.

That's very encouraging that it *can* work.

Movable Python 1.0.0 is now 'done', but I'm waiting for the next release of SPE/IPython before I release the distributions. Not open source now I'm afraid. :-(

(There is a pre-release version available).

Testing this can wait for the next release of Movable Python - by which time the updated features of py2exe are likely to be available.