cubicweb/test/data/libpython/cubicweb_forge/__init__.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Tue, 07 Jun 2016 18:21:13 +0200
changeset 11459 8987a05950dc
parent 11057 cubicweb/test/data/cubes/forge/__init__.py@0b59724cb3f2
permissions -rw-r--r--
Handle cubes as packages in cwconfig 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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6314
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     1
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     2
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     3
#
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     4
# This file is part of CubicWeb.
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     5
#
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     6
# CubicWeb is free software: you can redistribute it and/or modify it under the
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     7
# terms of the GNU Lesser General Public License as published by the Free
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     8
# Software Foundation, either version 2.1 of the License, or (at your option)
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     9
# any later version.
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    10
#
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    11
# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    13
# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    14
# details.
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    15
#
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    16
# You should have received a copy of the GNU Lesser General Public License along
b233cc448bdd [test] add some fake cubes necessary for test so we don't depend on the actual forge cube
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    17
# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.