skeleton/__pkginfo__.py.tmpl
changeset 10214 88f60d4b9952
parent 8565 53c8cf9450b9
equal deleted inserted replaced
10213:e53cc2182cf8 10214:88f60d4b9952
    11 author = '%(author)s'
    11 author = '%(author)s'
    12 author_email = '%(author-email)s'
    12 author_email = '%(author-email)s'
    13 description = '%(shortdesc)s'
    13 description = '%(shortdesc)s'
    14 web = 'http://www.cubicweb.org/project/%%s' %% distname
    14 web = 'http://www.cubicweb.org/project/%%s' %% distname
    15 
    15 
    16 __depends__ =  %(dependencies)s
    16 __depends__ = %(dependencies)s
    17 __recommends__ = {}
    17 __recommends__ = {}
    18 
    18 
    19 classifiers = [
    19 classifiers = [
    20     'Environment :: Web Environment',
    20     'Environment :: Web Environment',
    21     'Framework :: CubicWeb',
    21     'Framework :: CubicWeb',
    27 from os.path import join, isdir
    27 from os.path import join, isdir
    28 from glob import glob
    28 from glob import glob
    29 
    29 
    30 THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
    30 THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
    31 
    31 
       
    32 
    32 def listdir(dirpath):
    33 def listdir(dirpath):
    33     return [join(dirpath, fname) for fname in _listdir(dirpath)
    34     return [join(dirpath, fname) for fname in _listdir(dirpath)
    34             if fname[0] != '.' and not fname.endswith('.pyc')
    35             if fname[0] != '.' and not fname.endswith('.pyc')
    35             and not fname.endswith('~')
    36             and not fname.endswith('~')
    36             and not isdir(join(dirpath, fname))]
    37             and not isdir(join(dirpath, fname))]
    38 data_files = [
    39 data_files = [
    39     # common files
    40     # common files
    40     [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
    41     [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
    41     ]
    42     ]
    42 # check for possible extended cube layout
    43 # check for possible extended cube layout
    43 for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'wdoc', 'i18n', 'migration'):
    44 for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data',
       
    45               'wdoc', 'i18n', 'migration'):
    44     if isdir(dname):
    46     if isdir(dname):
    45         data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
    47         data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
    46 # Note: here, you'll need to add subdirectories if you want
    48 # Note: here, you'll need to add subdirectories if you want
    47 # them to be included in the debian package
    49 # them to be included in the debian package
    48