doc/book/en/devrepo/cubes/layout.rst
branchstable
changeset 6120 c000e41316ec
parent 5608 f9ab62103ad4
equal deleted inserted replaced
6119:b217635d3b28 6120:c000e41316ec
   106 .. XXX WRITEME
   106 .. XXX WRITEME
   107 
   107 
   108 The :file:`__pkginfo__.py` file
   108 The :file:`__pkginfo__.py` file
   109 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   109 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   110 
   110 
   111 It contains metadata describing your cube, mostly useful for
   111 It contains metadata describing your cube, mostly useful for packaging.
   112 packaging.
   112 
       
   113 Two important attributes of this module are __depends__ and __recommends__
       
   114 dictionaries that indicates what should be installed (and each version if
       
   115 necessary) for the cube to work.
       
   116 
       
   117 Dependency on other cubes are expected to be of the form 'cubicweb-<cubename>'.
       
   118 
       
   119 When an instance is created, dependencies are automatically installed, while
       
   120 recommends are not.
       
   121 
       
   122 Recommends may be seen as a kind of 'weak dependency'. Eg, the most important
       
   123 effect of recommending a cube is that, if cube A recommends cube B, the cube B
       
   124 will be loaded before the cube A (same thing happend when A depends on B).
       
   125 
       
   126 Having this behaviour is sometime desired: on schema creation, you may rely on
       
   127 something defined in the other's schema; on database creation, on something
       
   128 created by the other's postcreate, and so on.
   113 
   129 
   114 
   130 
   115 :file:`migration/precreate.py` and :file:`migration/postcreate.py`
   131 :file:`migration/precreate.py` and :file:`migration/postcreate.py`
   116 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   132 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   117 
   133