skeleton/__pkginfo__.py.tmpl
changeset 0 b97547f5f1fa
child 139 16aafc56a1ac
equal deleted inserted replaced
-1:000000000000 0:b97547f5f1fa
       
     1 # pylint: disable-msg=W0622
       
     2 """%(distname)s application packaging information"""
       
     3 
       
     4 distname = '%(distname)s'
       
     5 
       
     6 numversion = (0, 1, 0)
       
     7 version = '.'.join(str(num) for num in numversion)
       
     8 
       
     9 license = 'LCL'
       
    10 copyright = '''Copyright (c) 2008 LOGILAB S.A. (Paris, FRANCE).
       
    11 http://www.logilab.fr/ -- mailto:contact@logilab.fr'''
       
    12 
       
    13 author = 'Logilab'
       
    14 author_email = 'contact@logilab.fr'
       
    15 
       
    16 short_desc = '%(shortdesc)s'
       
    17 long_desc = '''%(longdesc)s'''
       
    18 
       
    19 from os import listdir as _listdir
       
    20 from os.path import join, isdir
       
    21 
       
    22 from glob import glob
       
    23 scripts = glob(join('bin', '%(cubename)s-*'))
       
    24 
       
    25 web, ftp = '', ''
       
    26 
       
    27 pyversions = ['2.4']
       
    28 
       
    29 #from cubicweb.devtools.pkginfo import get_distutils_datafiles
       
    30 CUBES_DIR = join('share', 'cubicweb', 'cubes')
       
    31 THIS_CUBE_DIR = join(CUBES_DIR, '%(cubename)s')
       
    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 
       
    38 
       
    39 try:
       
    40     data_files = [
       
    41         # common files
       
    42         [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
       
    43         
       
    44         # client (web) files
       
    45         [join(THIS_CUBE_DIR, 'data'),  listdir('data')],
       
    46         [join(THIS_CUBE_DIR, 'i18n'),  listdir('i18n')],
       
    47         
       
    48         # server files
       
    49         [join(THIS_CUBE_DIR, 'migration'), listdir('migration')],
       
    50         ]
       
    51     
       
    52     # check for possible extended cube layout
       
    53     for dirname in ('entities', 'views', 'sobjects', 'schema'):
       
    54         if isdir(dirname):
       
    55             data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
       
    56     # Note: here, you'll need to add subdirectories if you want
       
    57     # them to be included in the debian package
       
    58 except OSError:
       
    59     # we are in an installed directory
       
    60     pass
       
    61 
       
    62 
       
    63 cube_eid = None # <=== FIXME if you need direct bug-subscription
       
    64 __use__ = (%(dependancies)s)
       
    65