[Distutils] Setuptools: omit namespace package directories?

Thomas Lotze thomas at thomas-lotze.de
Fri Feb 9 10:51:47 CET 2007


Phillip J. Eby wrote:

> At 05:05 PM 2/8/2007 +0100, Thomas Lotze wrote:
> I'm not sure that's entirely true, although they *do* have to exist when
> using "setup.py develop", or they won't be importable.  Have you tried
> using the distutils package_dir mapping to remap your source tree?

To achieve what? One does want to support setup.py develop, after all.

> As Jim points out, nested namespace packages are usually a bad idea and
> shouldn't be created for new systems, as entry points are a better way of
> supporting third-party extensions to a package.  Thus, having a single
> top-level namespace to denote a publisher or product line is usually
> sufficient.

But if you want to distribute a package as separate eggs, you have to
split it into subpackages, which you have to name somehow. If I'm not
mistaken about the concept of entry points, they aren't relevant for this. 

>>However, you end up jumping through
>>essentially empty directories all the time while working on the source.
>>There's evidence that this problem is a real one: buildout recipes
>>registered with PyPI tend to omit the "recipe" part at the expense of
>>namespace hygiene and PEP 8 compliance, for example gocept.download or
>>buildout_script.
> 
> I don't understand.

What don't you understand?

> As I said, I'm not sure it needs them *now*, except to support setup.py
> develop.  I'm not really fond of the package_dirs feature, preferring to
> use an importable layout when I do development.  But the feature does
> exist and please feel free to let me know whether it solves your problem,
> or report *specifically* what it does or does not do correctly and what
> output is produced.  Thanks.

For me, package_dirs does correctly what it's supposed to do, which does
not include setup.py develop. Not having that is a show stopper for
development.

-- 
Thomas





More information about the Distutils-SIG mailing list