[Cubicweb] CWEP 0004 - Cubes as distributions

Christophe de Vienne christophe at unlish.com
Thu Oct 23 10:51:14 CEST 2014


Le 23/10/2014 10:34, Nicolas Chauvat a écrit :
> On Thu, Oct 23, 2014 at 08:56:39AM +0200, Denis Laxalde wrote:
>> above, do you know how other applications also using "private
>> modules/package" work with this development mode (if they do)?
> This makes me think of cubes as plugins or extensions to CubicWeb.
>
> Looking at the debian packages for Mercurial, I see mercurial
> extensions are put into dist-packages/hgext/ and can be imported
> individually.
Yes. But IIRC hgext is not a namespace. Meaning the actual module path 
of the extension may be different in development mode and once installed.
So, to get things from another extension, I guess you would need to use 
the api to know from where an extension was loaded.

> PS: I still dislike setuptools, entry points, venv and all that
> machinery that I find too complex (and mostly useless) compared to
> PYTHONPATH, but I won't oppose to the change and vote -0 if it can
> really help CubicWeb gain more traction by making it follow standard
> (bad) practices.
Note that my proposal is mainly about using the PYTHONPATH and the 
smallest interface reasonable for the module, while removing the cubes 
path machinery and make develop mode possible.

The entry-points comes in only as a possible lookup mechanism, mainly 
for the "list" operation of cubicweb-ctl.
We could probably do without them.



More information about the Cubicweb mailing list