[maemo-developers] Issues with Python and maemo-optify (was: Re: Maemo Summit /opt BOF notes...)

From: Anderson Lizardo anderson.lizardo at openbossa.org
Date: Wed Oct 14 14:06:13 EEST 2009
On Wed, Oct 14, 2009 at 1:59 AM, Martin Grimme <martin.grimme at gmail.com> wrote:
> Hi,
> I'd suggest to not optify Python, but instead install the modules from
> /usr/lib/python to /opt, or ZIP it up. I think I've seen it already
> zipped up on some distribution, so this would be a way.

Yes, Python for earlier Maemo versions (Diablo and earlier) used to do
this, but actually the zipped file had compression disabled, so it
worked just like a .tar file (i.e. only archiving).

IIRC it had something to do with theoretical faster startup and
imports. Anyway, we "disabled" it on Fremantle after moving to the
Debian packaging, but we will surely revisit it and get real rumbers
on the actual size reduction / performance gains.

> Or compile the
> whole stuff with --prefix=/opt/python, and just put the links python
> and python2.5 into /usr/bin/. The site.py module could still be
> modified to support legacy modules that use /usr/ prefix.
> Optification looks like an ugly hack to me anyway, and the --prefix
> option should be used where possible.

This is partially what Andrew suggests. But note that, as I explained,
symlinking /usr/bin/python2.5 will NOT work without modifying
python2.5 sources, because python uses readlink() calls to get the
absolute paths, and dereferences symlinks in the process.

Thanks for your suggestions!
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
More information about the maemo-developers mailing list