[Pythonmac-SIG] Packaging all toolbox modules in a package

Jack Jansen jack@oratrix.nl
Tue, 07 Aug 2001 11:33:01 +0200


I'm all in favor of the idea to put all toolbox modules in a package. 
Actually, if people don't start yelling NO! NO! NO! right away I might 
commence with the overhaul this week.

> Maybe it could almost be as simple as this:
> 
>     Carbon/
>         __init__.py   # empty
>         Evt.so        # or Evt.carbon.slb of course
>         Events.py
>         Win.so
>         Res.so
>         Qd.so
>         ..etc...

And will it bother OS9 users that they have to say Carbon.Evt even if they're 
using classic PPC Python?

It wouldn't bother me, but I'm just asking...

> Then either Carbon/ itself is on sys.path (b/w compatible) or the surrounding
> folder (forcing "from Carbon import Qd") or even both?

Yep.

> It's a little tricky as under MacPython some of the Mac modules (Qd, Res, a
> bunch of others) aren't available as shared libs, but are part of PythonCore,
> but overall I think it's possible to privide a smooth transition path.

No problem anymore: because I had to fix this for OSX (the 
WITH_MAC_TOOLBOX_GLUE stuff) we can now put all toolbox modules in their own 
.slb.

The only issue I can see is that I don't know whether it's possible to do the 
install automatically for OSX unix-Python builds. But that is a minor issue, 
it might even be a good idea to do the whole toolbox stuff as a separate 
distutils-based "distribution" (included in the standard distribution).
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm