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