cubicweb/cwconfig.py
branch3.24
changeset 11881 6707748e3982
parent 11859 2e1a1ebd4730
child 11929 fcbd6b251d81
--- a/cubicweb/cwconfig.py	Wed Dec 07 14:13:20 2016 +0100
+++ b/cubicweb/cwconfig.py	Fri Dec 09 15:08:52 2016 +0100
@@ -185,7 +185,7 @@
 import logging
 import logging.config
 import os
-from os.path import (exists, join, expanduser, abspath, normpath,
+from os.path import (exists, join, expanduser, abspath, normpath, realpath,
                      basename, isdir, dirname, splitext)
 import pkgutil
 import pkg_resources
@@ -378,7 +378,7 @@
         mode = _forced_mode or 'system'
         _CUBES_DIR = join(_INSTALL_PREFIX, 'share', 'cubicweb', 'cubes')
 
-    CUBES_DIR = abspath(os.environ.get('CW_CUBES_DIR', _CUBES_DIR))
+    CUBES_DIR = realpath(abspath(os.environ.get('CW_CUBES_DIR', _CUBES_DIR)))
     CUBES_PATH = os.environ.get('CW_CUBES_PATH', '').split(os.pathsep)
 
     options = (
@@ -513,7 +513,7 @@
     @classmethod
     def cubes_search_path(cls):
         """return the path of directories where cubes should be searched"""
-        path = [abspath(normpath(directory)) for directory in cls.CUBES_PATH
+        path = [realpath(abspath(normpath(directory))) for directory in cls.CUBES_PATH
                 if directory.strip() and exists(directory.strip())]
         if not cls.CUBES_DIR in path and exists(cls.CUBES_DIR):
             path.append(cls.CUBES_DIR)