equal
deleted
inserted
replaced
696 @classmethod |
696 @classmethod |
697 def cls_adjust_sys_path(cls): |
697 def cls_adjust_sys_path(cls): |
698 """update python path if necessary""" |
698 """update python path if necessary""" |
699 from cubicweb import _CubesImporter |
699 from cubicweb import _CubesImporter |
700 _CubesImporter.install() |
700 _CubesImporter.install() |
701 cubes_parent_dir = normpath(join(cls.CUBES_DIR, '..')) |
701 import cubes |
702 if not cubes_parent_dir in sys.path: |
702 cubes.__path__ = cls.cubes_search_path() |
703 sys.path.insert(0, cubes_parent_dir) |
|
704 try: |
|
705 import cubes |
|
706 cubes.__path__ = cls.cubes_search_path() |
|
707 except ImportError: |
|
708 return # cubes dir doesn't exists |
|
709 |
703 |
710 @classmethod |
704 @classmethod |
711 def load_available_configs(cls): |
705 def load_available_configs(cls): |
712 for confmod in ('web.webconfig', 'etwist.twconfig', |
706 for confmod in ('web.webconfig', 'etwist.twconfig', |
713 'server.serverconfig',): |
707 'server.serverconfig',): |