# HG changeset patch # User Denis Laxalde # Date 1476190107 -7200 # Node ID fe0fcb9e1fd07fb8cd0789f86987c6fbadc34a2e # Parent dd5df5fe7137f651608028deeb75d87d92908321 [config] Ignore cubicweb-pyramid in available_cubes() So that, in particular, its ccplugin.py does not get loaded (which would hide the "pyramid" command in cubicweb). Related to #14023058. diff -r dd5df5fe7137 -r fe0fcb9e1fd0 cubicweb/cwconfig.py --- a/cubicweb/cwconfig.py Thu Oct 06 12:15:43 2016 +0200 +++ b/cubicweb/cwconfig.py Tue Oct 11 14:48:27 2016 +0200 @@ -486,6 +486,9 @@ continue if not re.match('[_A-Za-z][_A-Za-z0-9]*$', cube): continue # skip invalid python package name + if cube == 'pyramid': + cls._warn_pyramid_cube() + continue cubedir = join(directory, cube) if isdir(cubedir) and exists(join(cubedir, '__init__.py')): cubes.add(cube) @@ -880,11 +883,15 @@ _cubes = None + @classmethod + def _warn_pyramid_cube(cls): + cls.warning("cubicweb-pyramid got integrated into CubicWeb; " + "remove it from your project's dependencies") + def init_cubes(self, cubes): cubes = list(cubes) if 'pyramid' in cubes: - self.warning("cubicweb-pyramid got integrated into CubicWeb; " - "remove it from your project's dependencies") + self._warn_pyramid_cube() cubes.remove('pyramid') self._cubes = self.reorder_cubes(cubes) # load cubes'__init__.py file first