On Tue, 2012-04-24 at 12:21 +0200, Hartmut Goebel wrote:
> Am 23.04.2012 14:40, schrieb Matteo Baracani:
> > If somebody wants to comment on the above, I'll gladly take your
> > suggestions into account during development.
> 
> To be frank: I don't think this is a feature for PyInstaller.
> 
> 1) PyInstaller is aiming to freeze *everything* required for executing
> the program to make it self-contained and independent of any installed
> Python version.

Actually, I disagree: that could be the most common goal, but one of the
features of PyInstaller is its flexibility in the way it can packages
stuff. There have been already instances of people using PyInstaller in
creative ways (eg: the so-called "open source mode" already discussed),
so I don't see why we should restrict this flexibility.

> 2) Only excluding the libpython does not make that much sense. One would
> want to exclude all standard modules, too. This would really save space.

Yes, that's probably something that would make sense. 

Notice that it's *not* a disk space issue: on Linux, there's no fixed
ABI as you know, so shipping binary stuff on Linux is close to
impossible, unless you do lots of tests, find a distribution which is
old enough but not too much, etc.

Say you want to package a program which is pure-python; it might use
lots of 3rd-party packages installed via pip/virtualenv, but they are
all pure Python; this is actually a very common scenario for webapp
development (django, cherrypy, etc.). In this case, Matteo's feature
means that you can *totally* ignore Linux ABI issue, and end up with a
single-file binary that represents a Python application, and can be
installed on *any* distribution with the correct (or newer) version of
Python preinstalled.

> 3) If you rely on an installed libpython, you can even rely on a
> complete standard Python installation. So you not even need the
> bootloader but just fire up the python executable.

No, because you still want to package 3rd-party stuff. 

> You idea sound more like a solution to use `pip bundle`, virtualenv  and
> some simple install script (which can be written in Python). Or like
> buildout and other solutions in this area.

True, pip bundle is similar. The only difference is that pip bundle is
an after-thought, it's not stable, and it "decompresses" the bundle on
disk. Moreover, it doesn't work if you're not using virtualenv, and
using virtualenv makes sense if you install via pip, which means that
you are installing only open source stuff, and not using an ecosystem of
closed-source libraries.

At the end of the day, my point of view is that it's pip bundle that is
stepping into PyInstaller's toes, not the other way round. We can do a
better, more general job with PyInstaller.

The fact that pip bundle exists, though, shows that there is demand for
such a feature, and PyInstaller can easily fill that niche.

> I suggest you to rethink your aims. Saving space on a somewhat current
> hard-disk is not worth spending time. 

Again, disk-space is not an issue. Easy of packaging, distribution, and
proprietary code is.
-- 
Giovanni Bajo   ::  [email protected]
Develer S.r.l.  ::  http://www.develer.com

My Blog: http://giovanni.bajo.it

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to