allow to test cubes within apycot using cubicweb from the debian package stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 24 Nov 2009 13:59:46 +0100
branchstable
changeset 3915 2d23304289a6
parent 3914 36be7a5e53ad
child 3916 6e7af0e8e524
allow to test cubes within apycot using cubicweb from the debian package
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: