cubicweb/test/data/libpython/cubicweb_comment/__pkginfo__.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/comment/__pkginfo__.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:
6491
ee9a10b6620e pylint option update
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6314
diff changeset
     1
# pylint: disable=W0622
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
     2
# 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
     3
# 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
     4
#
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
# 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
     6
#
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
# 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
     8
# 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
     9
# 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
    10
# 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
    11
#
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
# 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
    13
# 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
    14
# 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
    15
# 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
    16
#
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
# 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
    18
# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
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
    19
"""cubicweb-comment packaging information"""
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
    20
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
    21
distname = "cubicweb-comment"
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
    22
modname = distname.split('-', 1)[1]
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
    23
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
    24
numversion = (1, 4, 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
    25
version = '.'.join(str(num) for num in numversion)