cwconfig.py
changeset 2449 888d698af3f9
parent 2445 6f065b366d14
child 2473 490f88fb99b6
equal deleted inserted replaced
2446:440cb4ea7e5c 2449:888d698af3f9
   147     if os.environ.get('APYCOT_ROOT'):
   147     if os.environ.get('APYCOT_ROOT'):
   148         mode = 'test'
   148         mode = 'test'
   149         CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ
   149         CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ
   150         # create __init__ file
   150         # create __init__ file
   151         file(join(CUBES_DIR, '__init__.py'), 'w').close()
   151         file(join(CUBES_DIR, '__init__.py'), 'w').close()
   152     elif exists(join(CW_SOFTWARE_ROOT, '.hg')):
   152     elif exists(join(CW_SOFTWARE_ROOT, '.hg')) or os.environ.get('CW_MODE') == 'user':
   153         mode = 'dev'
   153         mode = 'dev'
   154         CUBES_DIR = abspath(normpath(join(CW_SOFTWARE_ROOT, '../cubes')))
   154         CUBES_DIR = abspath(normpath(join(CW_SOFTWARE_ROOT, '../cubes')))
   155     else:
   155     else:
   156         mode = 'installed'
   156         mode = 'installed'
   157         CUBES_DIR = '/usr/share/cubicweb/cubes/'
   157         CUBES_DIR = '/usr/share/cubicweb/cubes/'