[Distutils] namespace packages

David Cournapeau cournape at gmail.com
Thu Apr 22 09:36:51 CEST 2010


On Thu, Apr 22, 2010 at 1:10 PM, P.J. Eby <pje at telecommunity.com> wrote:
> At 10:18 AM 4/22/2010 +0900, David Cournapeau wrote:
>>
>> One problem with the setuptools implementation is
>> that several packages sharing the same namespace have files in common,
>
> If that were actually true (it isn't), then it would be considered a bug in
> setuptools.

I am confused, then, by the setuptools doc:

Note, by the way, that your project's source tree must include the
namespace packages' __init__.py files (and the __init__.py  of any
parent packages), in a normal Python package layout. These __init__.py
files must contain the line:

and because that's in the rationale of Pep 382. If this is not true,
we need to update our own instructions because we advise to write such
__init__.py in scikits namespace in the scipy community.

>> (setuptools namespace implementation depends on pkg_resources, which is a
>> complicated and quite slow piece of code).
>
> Slow at doing what, precisely, and slower compared to what alternative?

Merely importing it is already quite slow, and the question was about
whether to use namespace at all, so the alternative of not using it is
obviously faster. As I mentioned, it may not matter, but that's
certainly one of  reason why I refuse to use pkg_resources myself,

cheers,

David


More information about the Distutils-SIG mailing list