[Cubicweb] CWEP 0004 - Cubes as distributions
Christophe de Vienne
christophe at unlish.com
Thu Oct 23 11:40:04 CEST 2014
Le 23/10/2014 11:02, Nicolas Chauvat a écrit :
> On Thu, Oct 23, 2014 at 10:51:14AM +0200, Christophe de Vienne wrote:
>>> Looking at the debian packages for Mercurial, I see mercurial
>>> extensions are put into dist-packages/hgext/ and can be imported
>> Yes. But IIRC hgext is not a namespace.
> $ l /usr/lib/python2.7/dist-packages/hgext/__*py
> Looks like it is.
I meant, it is not a setuptools namespace package. You cannot have
multiple "hgext" directories across your filesystem acting like a single
> What is wrong with namespaces by the way?
> $ python -c "import this" | grep space
> Namespaces are one honking great idea -- let's do more of those!
namespaces are great indeed.
But here we would need to split the namespace "cubes" across multiple
directories. This is made possible by PEP420  in python 3.4.
For older python versions, the solution is to use setuptools namespace
And this is were the trouble may start. I do not say it must be avoided,
just that it will add some difficulties along the way.
More information about the Cubicweb