[Distutils] Multiple packages in a single distribution
Alex Clark
aclark at aclark.net
Tue Nov 13 20:25:56 CET 2012
Hi
I am performing a "fun" experiment with Plone in which I plan to
include a variety of namespace packages in a single distribution. This
works great with non-namespaced packages. Or rather I should say: if
you combine a series of name spaced packages into a flat namespace, it
works. E.g. the Products and plone packages[1]:
- Products/foo
- Products/bar
- plone/foo
- plone/bar
However, this completely falls down (at the distutils level, I guess)
when you attempt to do the same thing with namespace packages e.g.:
- plone.foo/plone/foo
- plone.bar/plone/bar
In distutils parlance, it looks like this (this works):
packages=[
'Products',
'plone',
],
package_dir={
'Products': 'Products',
'plone': 'plone',
'': 'plone.app.content',
},
namespace_packages=[
'Products',
'plone',
],
What I'd love to be able to do is to continue to add items to package_dir e.g.:
package_dir={
'Products': 'Products',
'plone': 'plone',
'': 'plone.app.content',
'': 'plone.app.foo',
'': 'plone.app.bar',
},
Because this would allow me to use git submodules. But, I'm guessing,
since distutils never supported namespace packages (it's a setuptools
feature, right?) then this will never work as I'd like it to. Aside
from actually combining all the namespace packages, is there any other
approach?
Thanks for any thoughts,
Alex
[1] https://github.com/aclark4life/plock
--
Alex Clark · https://www.gittip.com/aclark4life/
More information about the Distutils-SIG
mailing list