[Fwd: Re: [Pythonmac-SIG] OS X import bug?]

Marcel Prastawa prastawa@cs.unc.edu
Sat, 26 Jan 2002 08:03:08 -0500


Manoj Plakal wrote:
 > Which modules are these? From the replies I saw
 > on c.l.py, it seems that the two-level
 > setup corresponds to the way extension
 > modules are built and used on Linux
 > and Windows (symbols within modules
 > don't clash with each other).
 >
 > Why do some modules need the flat namespace?

I could only think of several examples: the Mac specific modules, VTK (a 
visualization toolkit).

Two-level namespace binaries need to have all symbols resolved at 
compile time. This is difficult to do if your extension has some complex 
dependencies. When porting an application, you could save a lot of time 
by building it as a flat namespace binary.

 
> Actually, instead of only one or
> the other, it might be a better
> idea for Python to provide
> a distutils option for
> flat or 2-level namespace when
> building extension modules. I added
> this as a follow-up to my bug report
> on Sourceforge:

Great idea! I got so used to editing the Makefile, the thought didn't 
occur to me. I certainly hope that it's possible to do so in distutils.

Marcel