Skip to content
  • Denis Laxalde's avatar
    Handle cubes as packages in cwconfig · 8987a05950dc
    Denis Laxalde authored
    Rely on importlib.import_module in several places in cwconfig.py, so this
    would not work with python 2.6.
    
    Method available_cubes will not list cubes installed as package for now. I'm
    not sure it's worth implementing this method (used in `cubicweb-ctl list
    cubes` command) for new cubes layout as the same result can basically be
    obtained with `pip freeze | grep cubicweb_`.
    
    In unittest_cwconfig.py, duplicate CubicWebConfigurationTC test case to test
    both the "cubes as packages" layout and the "legacy cubes" layout. The former
    having a custom sys.path set (pointing to datapath('libpython') where all
    cubes' packages live) and the latter having the previous config attribute
    setup.
    
    All test data cubes are moved to packages in libpython directory and symlinks
    are introduced in the cubes directory.
    
    Related to #13001466.
    8987a05950dc