Skip to content
Snippets Groups Projects
__pkginfo__.py 2.67 KiB
Newer Older
Nicolas Chauvat's avatar
Nicolas Chauvat committed
# pylint: disable-msg=W0622
"""cubicweb-comment packaging information"""

modname = 'comment'
distname = "cubicweb-%s" % modname
Sylvain Thénault's avatar
1.5
Sylvain Thénault committed
numversion = (1, 5, 0)
Nicolas Chauvat's avatar
Nicolas Chauvat committed
version = '.'.join(str(num) for num in numversion)

license = 'LGPL'
copyright = '''Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE).
Nicolas Chauvat's avatar
Nicolas Chauvat committed
http://www.logilab.fr/ -- mailto:contact@logilab.fr'''

author = "Logilab"
author_email = "contact@logilab.fr"
web = 'http://www.cubicweb.org/project/%s' % distname
short_desc = "comment component for the CubicWeb framework"
long_desc = """\
Summary
-------

The `comment` cube provides threadable comments feature.

Screenshots
-----------

Threadable comment view:

.. image:: cube_comment1.png

Usage
-----
This cube creates a new entity type called `Comment` which could basically be
read by every body but only added by application's users.
It also defines a relation `comments` which provides the ability to add a
`Comment` which `comments` a `Comment`.

To use this cube, you want to add the relation `comments` on the entity type
you want to be able to comment. For instance, let's say your cube defines a
schema for a blog. You want all the blog entries to be commentable.
Here is how to define it in your schema:

.. sourcecode:: python

    class Blog(EntityType):
        title = String(maxsize=50, required=True)
        description = RichString()

    class BlogEntry(EntityType):
        title = String(required=True, fulltextindexed=True, maxsize=256)
        content = RichString(required=True, fulltextindexed=True)
        entry_of = SubjectRelation('Blog', cardinality='**')
        comments = ObjectRelation('Comment', cardinality='1*')

Once this relation is defined, you can post comments and view threadable
comments.
Nicolas Chauvat's avatar
Nicolas Chauvat committed
"""

from os import listdir
from os.path import join

CUBES_DIR = join('share', 'cubicweb', 'cubes')

try:
    data_files = [
        [join(CUBES_DIR, 'comment'),
         [fname for fname in listdir('.')
          if fname.endswith('.py') and fname != 'setup.py']],
        [join(CUBES_DIR, 'comment', 'data'),
         [join('data', fname) for fname in listdir('data')]],
        [join(CUBES_DIR, 'comment', 'i18n'),
         [join('i18n', fname) for fname in listdir('i18n')]],
        [join(CUBES_DIR, 'comment', 'migration'),
         [join('migration', fname) for fname in listdir('migration')]],
        ]
except OSError:
    # we are in an installed directory
    pass


cube_eid = 20316
# used packages
__depends_cubes__ = {}
__depends__ = {'cubicweb': '>= 3.2.0'}
__use__ = tuple(__depends_cubes__)
Arthur Lutz's avatar
Arthur Lutz committed
classifiers = [
           'Environment :: Web Environment',
           'Framework :: CubicWeb',
           'Programming Language :: Python',
           'Programming Language :: JavaScript',
]