skeleton/__pkginfo__.py.tmpl
changeset 11057 0b59724cb3f2
parent 11052 058bb3dc685f
child 11058 23eb30449fe5
equal deleted inserted replaced
11052:058bb3dc685f 11057:0b59724cb3f2
     1 # pylint: disable=W0622
       
     2 """%(distname)s application packaging information"""
       
     3 
       
     4 modname = '%(cubename)s'
       
     5 distname = '%(distname)s'
       
     6 
       
     7 numversion = (0, 1, 0)
       
     8 version = '.'.join(str(num) for num in numversion)
       
     9 
       
    10 license = '%(license)s'
       
    11 author = '%(author)s'
       
    12 author_email = '%(author-email)s'
       
    13 description = '%(shortdesc)s'
       
    14 web = 'http://www.cubicweb.org/project/%%s' %% distname
       
    15 
       
    16 __depends__ = %(dependencies)s
       
    17 __recommends__ = {}
       
    18 
       
    19 classifiers = [
       
    20     'Environment :: Web Environment',
       
    21     'Framework :: CubicWeb',
       
    22     'Programming Language :: Python',
       
    23     'Programming Language :: JavaScript',
       
    24     ]
       
    25 
       
    26 from os import listdir as _listdir
       
    27 from os.path import join, isdir
       
    28 from glob import glob
       
    29 
       
    30 THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
       
    31 
       
    32 
       
    33 def listdir(dirpath):
       
    34     return [join(dirpath, fname) for fname in _listdir(dirpath)
       
    35             if fname[0] != '.' and not fname.endswith('.pyc')
       
    36             and not fname.endswith('~')
       
    37             and not isdir(join(dirpath, fname))]
       
    38 
       
    39 data_files = [
       
    40     # common files
       
    41     [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
       
    42     ]
       
    43 # check for possible extended cube layout
       
    44 for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data',
       
    45               'wdoc', 'i18n', 'migration'):
       
    46     if isdir(dname):
       
    47         data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
       
    48 # Note: here, you'll need to add subdirectories if you want
       
    49 # them to be included in the debian package