At 04:31 PM 6/7/2006 -0600, Uche Ogbuji wrote:
>Based on the projects I see in my Python src directory, it is indeed
>common. Sometime the code dir is called "lib", sometimes "src", and
>occasionally something else. I guess we just seem to use a disjoint set
>of Python packages.
But that's not the same thing at all. The common layout in such a case is
to have
package_dir = {'':'src'} # or 'lib'
and that is quite a different layout from what you're doing.
I would be very curious to see what packages are doing as you are; at the
moment I know of one that actually uses a {'foo':''} convention (which has
similar problems), and I think I've seen one other besides yours that uses
{'foo':'lib'}.
But to my knowledge, the majority of 'src' and 'lib' dirs out there are
following the {'':'src'} or {'':'lib'} convention in setup.py, not the
{'foo':'lib'} one.
> > user confusion in understanding the layout,
>
>Again I don't see your point. Why do you think a user would be
>confused? This is the first I've heard such a claim in a long time
>managing project layouts.
Because there is no directory with the package's name, so simple browsing
of the directory layout will not tell you what packages are in it. The
src/ or lib/ prefix isn't the obstacle, it's the absence of disambiguating
information.
> > Actually, setuptools only mentions creating a *parent* package, e.g.
> > package_dir={'':'lib'}, where the 'amara' package directory would then
> > be a subdirectory of lib.
>
>That's true. But to me the fact that it's a prominent pattern in base
>distutils docs
I'd dispute that, as the distutils docs themselves *literally* describe the
layout with packages in the setup.py directory as being the "most
obvious". See:
http://python.org/doc/2.4.1/dist/listing-packages.html
The {'':'lib'} pattern is listed as "a different convention", and the
{'foo':'lib'} option is listed last, as "another possible convention" --
hardly a stellar recommendation. :)
Setuptools supports it, of course, because there *are* packages in the wild
that use it. Nonetheless, I won't pass up an opportunity to encourage
people to use the "most obvious" approach instead. :) I'm personally
migrating away from the habit of using the {'':'src'} convention myself.
>I'm just happy that it looks as if I'll be able to provide
>setuptools-enabled versions of 4Suite and Amara soonish.
I'm glad it's working for you. Please don't let any of this discourage you
from reporting bugs; I'm just as happy when a reported bug can be
considered fixed without actually making any code changes. ;-)
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig