[Distutils] ANN: py2app 0.1

Phillip J. Eby pje at telecommunity.com
Mon Oct 4 04:52:08 CEST 2004

At 04:51 PM 10/3/04 -0400, Bob Ippolito wrote:
>I believe PEAK, ZConfig, Twisted, etc. may do one or both of these things.

PEAK definitely includes data files in package directories, and the latest 
version of the distutils supports doing such installs directly.  (PEAK uses 
setuptools, though, since its minimum Python version is Python 2.2.2.)

I don't have a Mac, though, so I'll have to rely on your feedback regarding 
PEAK's buildability with py2app.  There are a number of potential issues:

* Current versions of Python have a broken reload() function with respect 
to PEP 302; PEAK uses 'reload()' to drive a "lazy import" facility that 
also allows setting triggers to run when modules are imported.

* PEAK uses in-package data files, and expects them to be accessible as 
regular files.  This means that even if reload() worked correctly, it would 
break with e.g. putting the package in a zipfile.  I do plan to make this 
PEP 302 compatible in the near future, by checking for a __loader__ 
attribute with a 'get_data()' method, and using that instead of direct 
filesystem access, if available.

* PEAK uses dynamic and lazy imports extensively, which makes it impossible 
to find all its imports using only bytecode analysis.  An ability to 
specify modules or packages as part of a setup.py is a must.

More information about the Distutils-SIG mailing list