[Distutils] extensions in packages

Konrad Hinsen hinsen@cnrs-orleans.fr
Fri, 21 May 1999 16:08:29 +0200


> 1) Define a switch that C extensions can check to determine whether the
> init func should be called initbar or initfoo_bar (or something).

I'd rather have a set of macros that automatically do the right thing,
but that's a minor detail. Changing the name of the init function is
certainly doable.

But if the init function contains the complete package path (and I see
no other way to avoid name clashes), then we have to worry about the
limitations that various systems impose on the name of global symbols.
I doubt that there are still many systems around that use only eight
characters, but I think 32 is a common limit. Although I am not really
sure about the current state of the art!

> 2) change the DL import mechanism so the init function *has* to be called
> initfoo_bar. But then, to remain backwards compatible you'd still have use
> a switch, so it doesn't help much now.

Backwards compatible with what? Currently builtin modules can't be
in packages at all, so nothing's lost.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------