Re: Using python + pygtk in Desktop modules (was Re: Revisiting the Gnome Bindings)



Qui, 2004-09-30 às 15:42 +0100, Mike Hearn escreveu:
> On Tue, 28 Sep 2004 23:20:38 +0100, Gustavo J. A. M. Carneiro wrote:
> >   Allow me to present cx_Freeze.  I hope this ends the Python API/ABI
> > compatibility discussion once and for all.
> > 
> >   http://starship.python.net/crew/atuining/cx_Freeze/index.html
> 
> Just to make it clear, Sean is talking about the Python module extension
> ABI (eg, libpython). From your own site:

  Not "my" site :)  I am unrelated to this project.

> 
> NOTE: Binary packages must be compatible with the Python installation on
> your system or you will get errors in your frozen executables about
> missing builtin modules or missing symbols. This is not likely to be a
> problem on Windows (since www.python.org is the only known distributor)
> but on Linux it is more likely (since Python is often packaged with the
> Linux distribution in different ways). If you get such errors, download
> the source package and build the binaries yourself.

   This binary compatibility note refers to the binary distribution of
cx_Freeze itself, not programs produced by cx_Freeze.

> ... which is sort of the whole point of Seans post. It's about *binary*
> compatibility for C extension libs, not Python APIs themselves.

  OK. The problem cx_Freeze solves is the following.  Imagine I want to
make a 3rd party application in python.  I don't want do depend on a
particular version of python or pygtk or whatever.  So, I install
cx_Freeze, and I create a binary distribution of my application.  This
binary distribution consists of a directory containing and exe file with
statically linked python interpreter + program code, and a few shared
libraries containing copies of all python C modules the program depends
on.

  Therefore, this binary distribution doesn't depend on python or pygtk
at all.  It only depends on the C shared libraries referenced by the
python modules, such as the GNOME libraries.  Since we provide ABI
stability for the GNOME libraries, my program distributed this way will
run on all future GNOME versions.

  I hear pygtk win32 developers use this trick all the time with great
success (see for example http://wingware.com/), although they usually
use py2exe instead of cx_Freeze (py2exe is win32 only).

  I'm not suggesting we create binary packages this way.  This approach
produces large binary packages with much code duplication.  Normally
it's better to just distribute the source and require a certain version
of python and pygtk.  But for 3rd party vendors, this could be a good
alternative.

  Regards.

-- 
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
The universe is always one step beyond logic.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]