# HG changeset patch # User Sylvain Thénault # Date 1259067586 -3600 # Node ID 2d23304289a6086f704f33dc4f0f7647bd0099be # Parent 36be7a5e53ad2ac49c21192bc7625449fe1c01af allow to test cubes within apycot using cubicweb from the debian package diff -r 36be7a5e53ad -r 2d23304289a6 cwconfig.py --- a/cwconfig.py Tue Nov 24 10:51:53 2009 +0100 +++ b/cwconfig.py Tue Nov 24 13:59:46 2009 +0100 @@ -216,9 +216,12 @@ if os.environ.get('APYCOT_ROOT'): mode = 'test' - CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ - # create __init__ file - file(join(CUBES_DIR, '__init__.py'), 'w').close() + if CWDEV: + CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ + # create __init__ file + file(join(CUBES_DIR, '__init__.py'), 'w').close() + else: + CUBES_DIR = '/usr/share/cubicweb/cubes/' elif (CWDEV and _forced_mode != 'system'): mode = 'user' CUBES_DIR = abspath(normpath(join(CW_SOFTWARE_ROOT, '../cubes'))) @@ -612,7 +615,10 @@ root = os.environ['APYCOT_ROOT'] REGISTRY_DIR = '%s/etc/cubicweb.d/' % root RUNTIME_DIR = tempfile.gettempdir() - MIGRATION_DIR = '%s/local/share/cubicweb/migration/' % root + if CWDEV: + MIGRATION_DIR = '%s/local/share/cubicweb/migration/' % root + else: + MIGRATION_DIR = '/usr/share/cubicweb/migration/' if not exists(REGISTRY_DIR): os.makedirs(REGISTRY_DIR) else: