[Pythonmac-SIG] Re: [Distutils] ANN: py2app 0.1
bob at redivi.com
Mon Oct 4 05:16:58 CEST 2004
On Oct 3, 2004, at 10:52 PM, Phillip J. Eby wrote:
> At 04:51 PM 10/3/04 -0400, Bob Ippolito wrote:
>> I believe PEAK, ZConfig, Twisted, etc. may do one or both of these
> 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.)
py2app is using setuptools too, supporting a minimum Python version of
2.3.0. It was MUCH MUCH simpler than using distutils directly.
Additionally I borrowed the sdist script from PyObjC that ignores
> 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
> * 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
Yeah, I was pretty sure that this was the case. You simply just
specify that you want to include PEAK as a package (which includes the
whole package as-is, outside of the zip file). At some point I'll add
a recipe that detects the presence of PEAK and makes this happen
automatically, like I do for pygame, but I'm going to wait a bit until
I hear about other packages so I can just do them all at once before
the next release.
More information about the Pythonmac-SIG