Re: [Pyobjc-dev] Mail plugin
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2005-01-19 06:33:45
|
On Jan 19, 2005, at 1:17, ytrewq1 wrote: > On Tue, 18 Jan 2005 04:08:34 -0500, Bob Ippolito <bo...@re...> > wrote: >> >> You should probably go ahead and use svn trunk of py2app (0.1.8) and >> PyObjC (1.3a0), I deprecated objc.registerPlugin today and came up >> with >> a better way of doing it that requires less effort. The documentation >> is up to date. >> >> http://svn.red-bean.com/pyobjc/trunk/pyobjc/NEWS.txt > > Thanks for this. I've pulled down svn trunk for both and installed > them [1]. ... > [1] I don't know why but I think the py2app examples got installed in > '/' -- > I wonder what I'm doing wrong. The installer packages are not in sync with the code. For early development, I use "python setup.py install" for PyObjC, and I have a pth file that points to my py2app source tree (no installation necessary). I've been rewriting bits of bdist_mpkg, and will probably have the installer packages working correctly again tonight. Sorry about that, I should change the message it displays in svn trunk. I'll probably add a distutils command to the PyObjC setup scripts that will create pth files that allow you to install in "developer" mode.. which will just make pth files for you that point to the build directory of PyObjC and the source directory of py2app. >>> 1) It'll work for QS plug-ins (I don't imagine it won't) >>> 2) I can package up PyObjC in a way that doesn't require it having to >>> live in each PyObjC plug-in (my current approach has a post 1.1 pre >>> 1.2 version of PyObjC living in a plug-in which all other PyObjC >>> plug-ins reference) >> >> If you included it in every plugin, it would just load whichever one >> comes first since sys.modules is global. If you have one plugin that >> always loads first, then you can simply exclude it from every other >> Python-based plugin and it should just work. > > PyObjC plug-ins I've built that include PyObjC bits tend to be larger > than > 1 MB and QS plug-ins are typically a fair bit smaller (e.g. less than > 100 kB). > The author of QS is not too keen on larger plug-ins -- which is one of > the > reasons I'd packaged up PyObjC separately and had the other plug-ins > depend on it. > > I've made some Makefiles to prune PyObjC bits from lib-dynload and > site-packages.zip -- does that sound like a reasonable approach or is > there a way to prevent certain items from getting included that I'm > missing? If you use --excludes=objc,Foundation,AppKit,PyObjCTools it will probably do that. The "PyObjC plugin" will probably want to have "import objc; import Foundation; import AppKit" in its source code (so that it doesn't pick up the tests) and --includes=PyObjCTools.* (should include the whole package, but still make it into the zip file). The module/package dependency stuff in py2app is currently really only suited for standalone packaging, but it'll grow built-in support for your use case eventually. -bob |