skeleton/__pkginfo__.py.tmpl
branchstable
changeset 2367 6ba269240f3b
parent 2157 a4acf959d07e
child 3344 699949007fc2
equal deleted inserted replaced
2366:e4229723b824 2367:6ba269240f3b
    32     return [join(dirpath, fname) for fname in _listdir(dirpath)
    32     return [join(dirpath, fname) for fname in _listdir(dirpath)
    33             if fname[0] != '.' and not fname.endswith('.pyc')
    33             if fname[0] != '.' and not fname.endswith('.pyc')
    34             and not fname.endswith('~')
    34             and not fname.endswith('~')
    35             and not isdir(join(dirpath, fname))]
    35             and not isdir(join(dirpath, fname))]
    36 
    36 
    37 try:
    37 data_files = [
    38     data_files = [
    38     # common files
    39         # common files
    39     [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
    40         [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
    40     ]
    41         ]
    41 # check for possible extended cube layout
    42     # check for possible extended cube layout
    42 for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
    43     for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
    43     if isdir(dirname):
    44         if isdir(dirname):
    44         data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
    45             data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
    45 # Note: here, you'll need to add subdirectories if you want
    46     # Note: here, you'll need to add subdirectories if you want
    46 # them to be included in the debian package
    47     # them to be included in the debian package
       
    48 except OSError:
       
    49     if exists(dirname(__file__)):
       
    50         raise
       
    51     # we are in an installed directory
       
    52 
    47 
    53 
    48 
    54 cube_eid = None # <=== FIXME if you need direct bug-subscription
    49 cube_eid = None # <=== FIXME if you need direct bug-subscription
    55 __use__ = (%(dependancies)s)
    50 __use__ = (%(dependancies)s)
    56 __recommend__ = ()
    51 __recommend__ = ()