cwconfig.py
branchstable
changeset 6659 6205927e927a
parent 6657 402bff898024
child 6660 f5a018f330ac
child 6729 1a423eaee782
--- a/cwconfig.py	Thu Oct 28 19:37:59 2010 +0200
+++ b/cwconfig.py	Fri Oct 29 00:03:30 2010 +0200
@@ -494,8 +494,6 @@
                 deps = dict( (x[len('cubicweb-'):], v)
                              for x, v in gendeps.iteritems()
                              if x.startswith('cubicweb-'))
-                if 'cubicweb' in gendeps:
-                    deps['cubicweb'] = gendeps['cubicweb']
         if not isinstance(deps, dict):
             deps = dict((key, None) for key in deps)
             warn('[3.8] cube %s should define %s as a dict' % (cube, key),
@@ -510,6 +508,16 @@
         return deps
 
     @classmethod
+    def cube_depends_cubicweb_version(cls, cube):
+        # XXX no backward compat (see _cube_deps above)
+        try:
+            pkginfo = cls.cube_pkginfo(cube)
+            deps = getattr(pkginfo, '__depends__')
+            return deps.get('cubicweb')
+        except AttributeError:
+            return None
+
+    @classmethod
     def cube_dependencies(cls, cube):
         """return cubicweb cubes used by the given cube"""
         return cls._cube_deps(cube, '__depends_cubes__', '__use__')