author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 31 Mar 2010 15:39:09 +0200 | |
changeset 5121 | a63d7886fcf5 |
parent 5025 | 2826f5406201 |
child 5163 | 3079b8345915 |
permissions | -rw-r--r-- |
0 | 1 |
# pylint: disable-msg=W0622 |
2 |
"""%(distname)s application packaging information""" |
|
3 |
||
548
195a0065aaae
missing quotes #102063
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
538
diff
changeset
|
4 |
modname = '%(cubename)s' |
0 | 5 |
distname = '%(distname)s' |
6 |
||
7 |
numversion = (0, 1, 0) |
|
8 |
version = '.'.join(str(num) for num in numversion) |
|
9 |
||
10 |
license = 'LCL' |
|
11 |
||
458
99712f0d5472
fix syntax in skeleton's __pkginfo__.py
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
365
diff
changeset
|
12 |
author = '%(author)s' |
99712f0d5472
fix syntax in skeleton's __pkginfo__.py
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
365
diff
changeset
|
13 |
author_email = '%(author-email)s' |
0 | 14 |
|
5024
9e718abe3fde
add egg support with dependencies auto-installation
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
4972
diff
changeset
|
15 |
description = '%(shortdesc)s' |
0 | 16 |
|
319
00ada106b138
fix skeleton __pkginfo__ template
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
232
diff
changeset
|
17 |
web = 'http://www.cubicweb.org/project/%%s' %% distname |
0 | 18 |
|
2157 | 19 |
|
20 |
from os import listdir as _listdir |
|
4214
91887e8cf50c
[skeleton] remove unused os.path.dirname import, use dname instead of dirname as an additional safetly belt
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3492
diff
changeset
|
21 |
from os.path import join, isdir, exists |
2157 | 22 |
from glob import glob |
23 |
||
24 |
THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname) |
|
0 | 25 |
|
26 |
def listdir(dirpath): |
|
27 |
return [join(dirpath, fname) for fname in _listdir(dirpath) |
|
28 |
if fname[0] != '.' and not fname.endswith('.pyc') |
|
1438
21b8f3961e6f
[distutils] don't consider directories as data files
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
548
diff
changeset
|
29 |
and not fname.endswith('~') |
1916
5c94f776e4f6
[skeleton] fix SyntaxError in __pkginfo__.py (looks like a copy/paste error from vim)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1438
diff
changeset
|
30 |
and not isdir(join(dirpath, fname))] |
0 | 31 |
|
2367
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
32 |
data_files = [ |
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
33 |
# common files |
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
34 |
[THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']], |
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
35 |
] |
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
36 |
# check for possible extended cube layout |
4214
91887e8cf50c
[skeleton] remove unused os.path.dirname import, use dname instead of dirname as an additional safetly belt
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3492
diff
changeset
|
37 |
for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'): |
91887e8cf50c
[skeleton] remove unused os.path.dirname import, use dname instead of dirname as an additional safetly belt
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3492
diff
changeset
|
38 |
if isdir(dname): |
91887e8cf50c
[skeleton] remove unused os.path.dirname import, use dname instead of dirname as an additional safetly belt
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3492
diff
changeset
|
39 |
data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)]) |
2367
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
40 |
# Note: here, you'll need to add subdirectories if you want |
6ba269240f3b
[skeleton] the new implementation of data_files will never raise a OSError
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
2157
diff
changeset
|
41 |
# them to be included in the debian package |
0 | 42 |
|
5024
9e718abe3fde
add egg support with dependencies auto-installation
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
4972
diff
changeset
|
43 |
__depends__ = {'cubicweb': '>= 3.6.0'} |
5025
2826f5406201
deprecate __use__ and __recommend__
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5024
diff
changeset
|
44 |
__depends_cubes__ = dict( (x[len('cubicweb-):], v) for x, v in __depends__ |
2826f5406201
deprecate __use__ and __recommend__
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5024
diff
changeset
|
45 |
if x.startswith('cubicweb-')) |
5024
9e718abe3fde
add egg support with dependencies auto-installation
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
4972
diff
changeset
|
46 |
__recommends__ = {} |
5025
2826f5406201
deprecate __use__ and __recommend__
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5024
diff
changeset
|
47 |
__recommends_cubes__ = dict( (x[len('cubicweb-):], v) for x, v in __recommends__ |
2826f5406201
deprecate __use__ and __recommend__
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5024
diff
changeset
|
48 |
if x.startswith('cubicweb-')) |
0 | 49 |