Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

I want py2exe not to create library.zip

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


gandalf at shopzeus

Sep 12, 2007, 1:09 PM

Post #1 of 8 (157 views)
Permalink
I want py2exe not to create library.zip

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

--
http://mail.python.org/mailman/listinfo/python-list


larry.bates at websafe

Sep 12, 2007, 1:55 PM

Post #2 of 8 (148 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

Laszlo Nagy wrote:
>
> 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
--
http://mail.python.org/mailman/listinfo/python-list


rtw at freenet

Sep 12, 2007, 2:20 PM

Post #3 of 8 (146 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

On Wed, 12 Sep 2007 22:09:30 +0200, Laszlo Nagy wrote:

> 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.

--
Rob.
--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Sep 12, 2007, 4:40 PM

Post #4 of 8 (143 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

On 2007-09-12, Laszlo Nagy <gandalf [at] shopzeus> wrote:

> I want py2exe not to create library.zip.

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

--
Grant Edwards grante Yow! Am I accompanied by a
at PARENT or GUARDIAN?
visi.com
--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Sep 12, 2007, 4:41 PM

Post #5 of 8 (149 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

On 2007-09-12, Rob Williscroft <rtw [at] freenet> wrote:
> On Wed, 12 Sep 2007 22:09:30 +0200, Laszlo Nagy wrote:
>
>> 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.

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

--
Grant Edwards grante Yow! Here I am in 53
at B.C. and all I want is a
visi.com dill pickle!!
--
http://mail.python.org/mailman/listinfo/python-list


gandalf at designaproduct

Sep 13, 2007, 2:55 AM

Post #6 of 8 (141 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

>> 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. :-)
--
http://mail.python.org/mailman/listinfo/python-list


gandalf at designaproduct

Sep 13, 2007, 2:59 AM

Post #7 of 8 (140 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

> 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

--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Sep 13, 2007, 8:35 AM

Post #8 of 8 (137 views)
Permalink
Re: I want py2exe not to create library.zip [In reply to]

On 2007-09-13, Laszlo Nagy <gandalf [at] designaproduct> wrote:
>
>>> 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...

--
Grant Edwards grante Yow! Let's all show human
at CONCERN for REVERAND MOON's
visi.com legal difficulties!!
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.