Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - comparing alternatives to py2exe

 
Thread Tools Search this Thread
Old 11-03-2009, 03:58 PM   #1
Default comparing alternatives to py2exe


Hi,

Recently I put together this incomplete comparison chart in an attempt
to choose between the different alternatives to py2exe:

http://spreadsheets.google.com/pub?k...dg&output=html

Columns represent methods of deploying to end-users such that they
don't have to worry about installing Python, packages or other
dependencies. 'Bundle' represents manually bundling an interpreter
with your app. 'Bootstrap' represents a fanciful idea of mine to
include an installer that downloads and installs an interpreter if
necessary. This sounds fiddly, since it would have to install side-by-
side with any existing interpreters of the wrong version, without
breaking anything. Has anyone done this?

The remaining columns represent the projects out there I could find
which would do the bundling for me.

Are there major things I'm missing or misunderstanding?

Perhaps folks on the list would care to rate (+1/-1) rows that they
find important or unimportant, or suggest additional rows that would
be important to them. Maybe an updated and complete version of this
table would help people agree on what's important, and help the
various projects to improve faster.

Best regards,

Jonathan


Jonathan Hartley
  Reply With Quote
Old 11-03-2009, 05:08 PM   #2
Maxim Khitrov
 
Posts: n/a
Default Re: comparing alternatives to py2exe
On Tue, Nov 3, 2009 at 10:58 AM, Jonathan Hartley <> wrote:
> Hi,
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?k...dg&output=html
>
> Columns represent methods of deploying to end-users such that they
> don't have to worry about installing Python, packages or other
> dependencies. 'Bundle' represents manually bundling an interpreter
> with your app. 'Bootstrap' represents a fanciful idea of mine to
> include an installer that downloads and installs an interpreter if
> necessary. This sounds fiddly, since it would have to install side-by-
> side with any existing interpreters of the wrong version, without
> breaking anything. Has anyone done this?


Maybe there is a way to use Portable Python for this, but I have no
experience with it.

> The remaining columns represent the projects out there I could find
> which would do the bundling for me.
>
> Are there major things I'm missing or misunderstanding?
>
> Perhaps folks on the list would care to rate (+1/-1) rows that they
> find important or unimportant, or suggest additional rows that would
> be important to them. Maybe an updated and complete version of this
> table would help people agree on what's important, and help the
> various projects to improve faster.
>
> Best regards,
>
> Â*Jonathan


Good work. Recently I played with cx_freeze and compared it to py2exe,
which I've been using for a while. Here are my findings:

1. I don't think cx_freeze supports single exe. I haven't even been
able to get it to append the generated library.zip file to the
executable using documented options. Other things like .pyd files
always seem to be separate. At the same time, singe executables
generated by py2exe do not always work. I have a program that works
fine on Windows XP, Vista, and 7 if it is built under XP. However, if
I build the exact same program under Windows 7, it no longer works on
Vista or XP. I'm sure it has something to do with SxS or other dll
issues.

2. For output directory structure, you are able to specify where to
put the generated executable and all of its dependencies with both
py2exe and cx_freeze. You cannot do things like put python26.dll in a
separate directory from the executable. Not sure if that is what you
are referring to.

3. py2exe does not support Python 3 (unfortunately).

4. Although cx_freeze does support optimization (-O), it's a bit
broken in that the __debug__ variable is always set to True. In other
words, the code is optimized and things like assert statements are not
executed, but conditional statements that check __debug__ == True are.
I know that py2exe does not have this problem, no experience with
other tools.

5. py2exe is capable of generating smaller executables than cx_freeze
because of the base executable size (18.5 KB vs 1.35 MB). This is
offset by the fact that py2exe saves many more standard library
components to library.zip by default. In a quick test I just ran, both
generated a package of 4.03 MB, but I can remove at least a meg from
py2exe's library.zip. Rather than "distribution size", I think it
makes more sense to show "overhead" above the required components
(exclude minimal library.zip, python dll, and pyd files).

6. cx_freeze is as easy to use as py2exe after looking at the bundled examples.

- Max


Maxim Khitrov
  Reply With Quote
Old 11-03-2009, 08:50 PM   #3
iu2
 
Posts: n/a
Default Re: comparing alternatives to py2exe
On Nov 3, 5:58*pm, Jonathan Hartley <tart...@tartley.com> wrote:
> Hi,
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?k...0bKxVdg&output....
>
> Columns represent methods of deploying to end-users such that they
> don't have to worry about installing Python, packages or other
> dependencies. 'Bundle' represents manually bundling an interpreter
> with your app. 'Bootstrap' represents a fanciful idea of mine to
> include an installer that downloads and installs an interpreter if
> necessary. This sounds fiddly, since it would have to install side-by-
> side with any existing interpreters of the wrong version, without
> breaking anything. Has anyone done this?
>
> The remaining columns represent the projects out there I could find
> which would do the bundling for me.
>
> Are there major things I'm missing or misunderstanding?
>
> Perhaps folks on the list would care to rate (+1/-1) rows that they
> find important or unimportant, or suggest additional rows that would
> be important to them. Maybe an updated and complete version of this
> table would help people agree on what's important, and help the
> various projects to improve faster.
>
> Best regards,
>
> * Jonathan


Another thing that I think is of interest is whether the application
support modifying the version and description of the exe (that is, on
Windows, when you right-click on an application and choose
'properties' you view the version number and description of the
application, it is a resource inside the exe). I think py2exe supports
it.


iu2
  Reply With Quote
Old 11-03-2009, 09:06 PM   #4
Maxim Khitrov
 
Posts: n/a
Default Re: comparing alternatives to py2exe
On Tue, Nov 3, 2009 at 3:50 PM, iu2 <> wrote:
> On Nov 3, 5:58Â*pm, Jonathan Hartley <tart...@tartley.com> wrote:
>> Hi,
>>
>> Recently I put together this incomplete comparison chart in an attempt
>> to choose between the different alternatives to py2exe:
>>
>> http://spreadsheets.google.com/pub?k...0bKxVdg&output....
>>
>> Columns represent methods of deploying to end-users such that they
>> don't have to worry about installing Python, packages or other
>> dependencies. 'Bundle' represents manually bundling an interpreter
>> with your app. 'Bootstrap' represents a fanciful idea of mine to
>> include an installer that downloads and installs an interpreter if
>> necessary. This sounds fiddly, since it would have to install side-by-
>> side with any existing interpreters of the wrong version, without
>> breaking anything. Has anyone done this?
>>
>> The remaining columns represent the projects out there I could find
>> which would do the bundling for me.
>>
>> Are there major things I'm missing or misunderstanding?
>>
>> Perhaps folks on the list would care to rate (+1/-1) rows that they
>> find important or unimportant, or suggest additional rows that would
>> be important to them. Maybe an updated and complete version of this
>> table would help people agree on what's important, and help the
>> various projects to improve faster.
>>
>> Best regards,
>>
>> Â* Jonathan

>
> Another thing that I think is of interest is whether the application
> support modifying the version and description of the exe (that is, on
> Windows, when you right-click on an application and choose
> 'properties' you view the version number and description of the
> application, it is a resource inside the exe). I think py2exe supports
> it.


py2exe supports this, cx_freeze doesn't.

- Max


Maxim Khitrov
  Reply With Quote
Old 11-04-2009, 12:21 AM   #5
Ryan Kelly
 
Posts: n/a
Default Re: comparing alternatives to py2exe

> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?k...dg&output=html
>
> ...snip...
>
> Are there major things I'm missing or misunderstanding?


A quick note - although I haven't tried it out, the latest version of
bbfreeze claims to support OSX.


Ryan

--
Ryan Kelly
http://www.rfk.id.au | This message is digitally signed. Please visit
| http://www.rfk.id.au/ramblings/gpg/ for details


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkrwyQIACgkQfI5S64uP50oDeACfUeBeF0RZYg rtorSE2n9sGnJw
9LwAoK95n8pBMDZrOxVhCFOid3ZgPbiR
=IDCJ
-----END PGP SIGNATURE-----



Ryan Kelly
  Reply With Quote
Old 11-04-2009, 08:15 AM   #6
Rüdiger Ranft
 
Posts: n/a
Default Re: comparing alternatives to py2exe
Maxim Khitrov schrieb:

> 1. I don't think cx_freeze supports single exe. I haven't even been
> able to get it to append the generated library.zip file to the
> executable using documented options. Other things like .pyd files
> always seem to be separate. At the same time, singe executables
> generated by py2exe do not always work. I have a program that works
> fine on Windows XP, Vista, and 7 if it is built under XP. However, if
> I build the exact same program under Windows 7, it no longer works on
> Vista or XP. I'm sure it has something to do with SxS or other dll
> issues.


I had similar issues with under Vista generated programs not running
under 2K (unfortunately I have to support it). This behavior came from
the .dll dependency tracking of py2exe, which included a OS .dll into
the dist output.

These are the steps I toke to find the offending .dll
* generated a "flat" directory (the .dll's not packed into library.zip)
with options = { [...], 'bundle_files': 3 }
* extracted the not loadable extension from library.zip
* examined the dependencies of this module with Microsoft's
"Dependency Walker" (you can find it somewhere in the MSDN)
* added the superfluous .dll to the
options = { [...], 'dll_excludes': ['offending.dll'] } parameter

HTH
Rudi


Rüdiger Ranft
  Reply With Quote
Old 11-04-2009, 11:21 AM   #7
Vesa Köppä
 
Posts: n/a
Default Re: comparing alternatives to py2exe
iu2 wrote:
> Another thing that I think is of interest is whether the application
> support modifying the version and description of the exe (that is, on
> Windows, when you right-click on an application and choose
> 'properties' you view the version number and description of the
> application, it is a resource inside the exe). I think py2exe supports
> it.


Pyinstaller supports this.

Vesa


Vesa Köppä
  Reply With Quote
Old 11-05-2009, 09:47 AM   #8
Jonathan Hartley
 
Posts: n/a
Default Re: comparing alternatives to py2exe
On Nov 4, 11:21*am, Vesa Köppä <vesa.ko...@gmail.com> wrote:
> iu2 wrote:
> > Another thing that I think is of interest is whether the application
> > support modifying the version and description of the exe (that is, on
> > Windows, when you right-click on an application and choose
> > 'properties' you view the version number and description of the
> > application, it is a resource inside the exe). I think py2exe supports
> > it.

>
> Pyinstaller supports this.
>
> Vesa


Thanks all for the inputs. I've updated my little chart and will
continue to refine and fill in the blanks.


Jonathan Hartley
  Reply With Quote
Old 11-05-2009, 02:26 PM   #9
Paul Boddie
 
Posts: n/a
Default Re: comparing alternatives to py2exe
On 3 Nov, 16:58, Jonathan Hartley <tart...@tartley.com> wrote:
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?k...0bKxVdg&output...


Nice comparison! Perhaps this could join the material on the Wiki
eventually:

http://wiki.python.org/moin/DistributionUtilities

If you don't want to spend time marking the table up, I'm sure I could
help you out.

Paul


Paul Boddie
  Reply With Quote
Old 11-06-2009, 03:07 PM   #10
Kevin Walzer
 
Posts: n/a
Default Re: comparing alternatives to py2exe
On 11/3/09 10:58 AM, Jonathan Hartley wrote:
> Hi,
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?k...dg&output=html
>


I noticed information on py2app was mostly missing from your chart.

--single exe file: yes, with qualification. On the Mac, standalone
applications are actually directories called "application bundles"
designed to look like a single file that can be double-clicked on. So, a
lot of stuff--the Python libraries, icons, other resource files--are
hidden inside the app bundle.

--without unzipping at runtime--Yes.
--control over output directory structure--no.

--creates installer too: yes, with qualification. If you're building an
app, you don't use an installer--the standard Mac method is
drag-and-drop installation. You can also use py2app to package up Python
libraries, and for these, it can create a standard Mac pkg installer.

--Python 3--not yet, as far as I know.
--can run as -O--not sure.
--control over process/ouput--not sure what this means.
--distribution size--Varies widely. A big Python application with lots
of libraries can exceed 100 megabytes, easily. A Python/Tkinter app with
no other extensions would weigh in at about 20 megabytes--that's the
smallest.
--active development--some, but only in svn. Last stable release was a
few years ago.
--active mailing list--no standalone mailing list, but the PythonMac-sig
mailing list has lots of discussion and bug reporting on py2app.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


Kevin Walzer
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Is this Software A Rip Off?Any Experiences?Freeware Alternatives Heidy Computer Support 5 04-10-2007 01:29 AM
RE: Is this Software A Rip Off?Any Experiences?Freeware Alternatives Heidy Computer Support 3 04-08-2007 06:45 PM
RE: Is this Software A Rip Off?Any Experiences?Freeware Alternatives Heidy Computer Information 1 04-08-2007 01:00 PM
good alternatives to adwords Aurum Solis Computer Information 0 07-09-2006 08:30 PM
Comparing x86 to x64. Dennis Pack Windows 64bit 1 01-29-2006 10:08 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46