[4suite] [Amara] Freezing amara. Changes on __init__.py

Jeremy Kloth jeremy.kloth at 4suite.org
Sun Aug 13 09:41:21 MDT 2006


On Sunday 13 August 2006 7:26 am, Luis Miguel Morillas wrote:
> I must change __init__.py for freezing apps with cx_freeze, if not
> apps raise a pkg_resources.DistributionNotFound exception.
>
> 64c63,67
> <     __version__ = pkg_resources.get_distribution('Amara').version
> ---
>
> >     try:
> >          __version__ = pkg_resources.get_distribution('Amara').version
> >     except pkg_resources.DistributionNotFound:
> >         import __version__
> >         __version__ = __version__.__version__

Basically, all of the freezing applications won't work with .eggs.  If a 
project uses any of the pkg_resources metadata utilities the frozen app 
*will* fail as that metadata cannot be found (and subsequentially stored) by 
the freezing application.

-- 
Jeremy Kloth
http://4suite.org/



More information about the 4suite mailing list