[Pythonmac-SIG] Distutils and bundlebuilder
Ronald Oussoren
oussoren at cistron.nl
Mon Sep 22 12:57:14 EDT 2003
On 22 sep 2003, at 11:34, Dinu Gherman wrote:
> Just van Rossum:
>
>> Distutils and PyPI are targeted mostly towards Python
>> libaries/packages,
>> not applications/tools. py2exe does integrate nicely with distutils,
>> so
>> it is possible, but I'm not convinced of the usefulness. I personally
>> use distutils to build and install libraries and bundlebuilder to
>> build
>> apps, and I've very rarely found those two operations overlap to the
>> extent that I wished they were the same.
>
> Ok, bundlebuilder builds .app bundles today, but something similar
> could also build screensaver bundles or IB palettes or whatever.
That's good idea, let's sneak into Guido's time machine.... Check out
PyObjCTools.pluginbuilder, this can be used to build plugin bundles,
such as preference panes and screensaver bundles.
Michael Hudson has tried to build a IB palette, but ran into some
problems. I had slightly more luck, but was running 10.3 at the time.
One major problem is that [NSBundle classNamed:] does not work
correctly with classes defined in Python: all those classes look like
they are implemented in the main bundle. That is a PyObjC bug, but one
that is not easily fixable because OSX doesn't expose an interface that
makes it possible to tell NSBundle/the objc-runtime about the bundle
that defined a class.
> Building a vanilla "Tool" (see PB categories) without any GUI in
> Python only would be nice, too. And/or do you suggest to extend
> bundlebuilder such that it provides the same registration mecha-
> nism that distutils "register" now has?
A vanilla "Tool" in PB is a command-line tool. Building those is easy
:-). If you want to build single-file executables you'll have a harder
job, although sometime like Py2exe should work.
Ronald
More information about the Pythonmac-SIG
mailing list