[Cubicweb] Cubicweb packaging problem

Yann Cointepas yann at cointepas.net
Tue Jul 29 17:23:33 CEST 2014


I am trying to create a "package" (i.e. a virtualenv based directory that
can be used after setting PATH, PYTHONPATH, etc.) containing Cubicweb to
use it on various Linux systems. My problem is that I cannot use "import
logilab" on systems that have already this module installed because, after
importation, I always have logilab.__file__ pointing to
/usr/lib/python2.7/dist-packages/logilab/__init__.pyc (I do testing on
Ubuntu) even if my PYTHONPATH is correct.

I checked (with a print) that logilab/__init__.py is executed from my
package. The problem comes from the content of that file. If I remove
"__import__('pkg_resources').declare_namespace(__name__)", I have no more
path problems (and I can finally "import cubicweb" from my package).

Do you think it is a bug in logilab module or in pkg_resources ?
Could someone suggest a better solution than modifying logilab/__init__.py
each time I create a new package ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20140729/a71f47f4/attachment-0185.html>

More information about the Cubicweb mailing list