I want py2exe not to create library.zip

L

Laszlo Nagy

Hi,

I want py2exe not to create library.zip. My reason is that the installed
program will be a self updating program, and it must be able to download
changes (newer python source files) from the server. So the files should
not be in library.zip. I tried the --bundle option but apparently it can
only be used to make the distribution __more__ bundled.

Thanks,

Laszlo
 
L

Larry Bates

Laszlo said:
Hi,

I want py2exe not to create library.zip. My reason is that the installed
program will be a self updating program, and it must be able to download
changes (newer python source files) from the server. So the files should
not be in library.zip. I tried the --bundle option but apparently it can
only be used to make the distribution __more__ bundled.

Thanks,

Laszlo
That is correct. People want less files to distribute not more. People
complain on py2exe list that it doesn't create a single .EXE file. Don't
try to update the program via patching "pieces". Wrap everything in a proper
installer (I use and highly recommend Inno Setup). It can handle version
control, there is a plug-in for over-the-wire updates, etc. Best way I know of
to automate everything.

-Larry
 
R

Rob Williscroft

Hi,

I want py2exe not to create library.zip. My reason is that the installed
program will be a self updating program, and it must be able to download
changes (newer python source files) from the server. So the files should
not be in library.zip. I tried the --bundle option but apparently it can
only be used to make the distribution __more__ bundled.

In your setup.py, after the call to setup(), use zipfile.ZipFile
to extract the "library.zip" into a directory called "library" then
delete the .zip.

I can't remember of the top of my head, but you may actually need
to rename the new directory to library.zip for your application
to work.
 
G

Grant Edwards

In your setup.py, after the call to setup(), use zipfile.ZipFile
to extract the "library.zip" into a directory called "library" then
delete the .zip.

Don't do that. Use the "skip_archive" option to tell it not to
create the zip file.
 
L

Laszlo Nagy

That is correct. People want less files to distribute not more. People
complain on py2exe list that it doesn't create a single .EXE file. Don't
try to update the program via patching "pieces". Wrap everything in a proper
installer (I use and highly recommend Inno Setup). It can handle version
control, there is a plug-in for over-the-wire updates, etc. Best way I know of
to automate everything.
It would be the best way for Windows. My program must work on different
platforms: FreeBSD, Linux MS Windows and possibly Mac OS.

1. It would be too difficult to create an different auto updating method
for MS Windows.
2. My auto update method updates only the changed .py files. Hopefully I
will have many users. I do not want them to download a 10MB inno setup
file after a small change in a py file.

The skip_archive option is the best. Thank you so much!

Laszlo
 
G

Grant Edwards

I want py2exe not to create library.zip.

setup (
[...]
options = {"py2exe": {"skip_archive":1}}
)

Cool! Just what I needed. Where it is documented? Ah, in the source. :)

That's pretty much it. :)

I found on WorkingWithVariousPackagesAndModules Wiki page a
reference to a command-line option --skip-archive. Then
googling for "py2exe skip archive" found an example similar to
the above. I haven't ever found any documentation for the
py2exe options. The documentation for the some of general
setup options tends to be a bit vague as well.

I've added a few things to the py2exe Wiki pages, but somebody
needs to start a page that just describes each of the py2exe
options and what problem they're intended to solve...
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top