# HG changeset patch # User Aurelien Campeas # Date 1236682060 -3600 # Node ID 2f984d7a5f8a1e03ec60dd4097dbe339773bc17e # Parent 829a82bd7c445869ce2b008314dbfe9f84f7379a# Parent 278f997aa25759899167d63b6586bffd2faedf32 merge diff -r 829a82bd7c44 -r 2f984d7a5f8a __init__.py --- a/__init__.py Mon Mar 09 18:53:10 2009 +0100 +++ b/__init__.py Tue Mar 10 11:47:40 2009 +0100 @@ -2,9 +2,9 @@ relations between entitites. :organization: Logilab -:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved. :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr -:license: General Public License version 2 - http://www.gnu.org/licenses +:license: Library General Public License version - http://www.gnu.org/licenses """ __docformat__ = "restructuredtext en" from cubicweb.__pkginfo__ import version as __version__ diff -r 829a82bd7c44 -r 2f984d7a5f8a cwconfig.py --- a/cwconfig.py Mon Mar 09 18:53:10 2009 +0100 +++ b/cwconfig.py Tue Mar 10 11:47:40 2009 +0100 @@ -353,8 +353,9 @@ @classmethod def cls_adjust_sys_path(cls): """update python path if necessary""" - if not cls.CUBES_DIR in sys.path: - sys.path.insert(0, cls.CUBES_DIR) + cubes_parent_dir = normpath(join(cls.CUBES_DIR, '..')) + if not cubes_parent_dir in sys.path: + sys.path.insert(0, cubes_parent_dir) try: import cubes cubes.__path__ = cls.cubes_search_path() diff -r 829a82bd7c44 -r 2f984d7a5f8a test/unittest_cwconfig.py --- a/test/unittest_cwconfig.py Mon Mar 09 18:53:10 2009 +0100 +++ b/test/unittest_cwconfig.py Tue Mar 10 11:47:40 2009 +0100 @@ -73,6 +73,9 @@ 'email/entities.py', 'email/views', 'email/hooks.py']) def test_cubes_path(self): + # make sure we don't import the email cube, but the stdlib email package + import email + self.assertNotEquals(dirname(email.__file__), self.config.CUBES_DIR) os.environ['CW_CUBES_PATH'] = join(dirname(__file__), 'data', 'cubes') self.assertEquals(self.config.cubes_search_path(), [abspath(join(dirname(__file__), 'data', 'cubes')),