|
1 # pylint: disable=W0622,C0103 |
|
2 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
|
3 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
4 # |
|
5 # This file is part of CubicWeb. |
|
6 # |
|
7 # CubicWeb is free software: you can redistribute it and/or modify it under the |
|
8 # terms of the GNU Lesser General Public License as published by the Free |
|
9 # Software Foundation, either version 2.1 of the License, or (at your option) |
|
10 # any later version. |
|
11 # |
|
12 # CubicWeb is distributed in the hope that it will be useful, but WITHOUT |
|
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
14 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
|
15 # details. |
|
16 # |
|
17 # You should have received a copy of the GNU Lesser General Public License along |
|
18 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
|
19 """cubicweb global packaging information for the cubicweb knowledge management |
|
20 software |
|
21 """ |
|
22 |
|
23 modname = distname = "cubicweb" |
|
24 |
|
25 numversion = (3, 22, 0) |
|
26 version = '.'.join(str(num) for num in numversion) |
|
27 |
|
28 description = "a repository of entities / relations for knowledge management" |
|
29 author = "Logilab" |
|
30 author_email = "contact@logilab.fr" |
|
31 web = 'http://www.cubicweb.org' |
|
32 license = 'LGPL' |
|
33 |
|
34 classifiers = [ |
|
35 'Environment :: Web Environment', |
|
36 'Framework :: CubicWeb', |
|
37 'Programming Language :: Python', |
|
38 'Programming Language :: JavaScript', |
|
39 ] |
|
40 |
|
41 __depends__ = { |
|
42 'six': '>= 1.4.0', |
|
43 'logilab-common': '>= 0.63.1', |
|
44 'logilab-mtconverter': '>= 0.8.0', |
|
45 'rql': '>= 0.34.0', |
|
46 'yams': '>= 0.42.0', |
|
47 #gettext # for xgettext, msgcat, etc... |
|
48 # web dependencies |
|
49 'lxml': '', |
|
50 # XXX graphviz |
|
51 # server dependencies |
|
52 'logilab-database': '>= 1.15.0', |
|
53 'passlib': '', |
|
54 'pytz': '', |
|
55 'Markdown': '' |
|
56 } |
|
57 |
|
58 __recommends__ = { |
|
59 'docutils': '>= 0.6', |
|
60 'Pillow': '', # for captcha |
|
61 'pycrypto': '', # for crypto extensions |
|
62 'fyzz': '>= 0.1.0', # for sparql |
|
63 'vobject': '>= 0.6.0', # for ical view |
|
64 'rdflib': None, # |
|
65 'pyzmq': None, |
|
66 'Twisted': '', |
|
67 #'Products.FCKeditor':'', |
|
68 #'SimpleTAL':'>= 4.1.6', |
|
69 } |
|
70 |
|
71 import sys |
|
72 from os import listdir, environ |
|
73 from os.path import join, isdir |
|
74 import glob |
|
75 |
|
76 scripts = [s for s in glob.glob(join('bin', 'cubicweb-*')) |
|
77 if not s.endswith('.bat')] |
|
78 include_dirs = [join('test', 'data'), |
|
79 join('server', 'test', 'data'), |
|
80 join('hooks', 'test', 'data'), |
|
81 join('web', 'test', 'data'), |
|
82 join('devtools', 'data'), |
|
83 join('devtools', 'test', 'data'), |
|
84 'schemas', 'skeleton'] |
|
85 |
|
86 |
|
87 _server_migration_dir = join(modname, 'misc', 'migration') |
|
88 _data_dir = join(modname, 'web', 'data') |
|
89 _wdoc_dir = join(modname, 'web', 'wdoc') |
|
90 _wdocimages_dir = join(_wdoc_dir, 'images') |
|
91 _views_dir = join(modname, 'web', 'views') |
|
92 _i18n_dir = join(modname, 'i18n') |
|
93 |
|
94 _pyversion = '.'.join(str(num) for num in sys.version_info[0:2]) |
|
95 if '--home' in sys.argv: |
|
96 # --home install |
|
97 pydir = 'python' + _pyversion |
|
98 else: |
|
99 pydir = join('python' + _pyversion, 'site-packages') |
|
100 |
|
101 # data files that shall be copied into the main package directory |
|
102 package_data = { |
|
103 'cubicweb.web.views':['*.pt'], |
|
104 } |
|
105 |
|
106 try: |
|
107 # data files that shall be copied outside the main package directory |
|
108 data_files = [ |
|
109 # server data |
|
110 [join('share', 'cubicweb', 'schemas'), |
|
111 glob.glob(join(modname, 'schemas', '*.sql'))], |
|
112 [join('share', 'cubicweb', 'migration'), |
|
113 [join(_server_migration_dir, filename) |
|
114 for filename in listdir(_server_migration_dir)]], |
|
115 # web data |
|
116 [join('share', 'cubicweb', 'cubes', 'shared', 'data'), |
|
117 [join(_data_dir, fname) for fname in listdir(_data_dir) |
|
118 if not isdir(join(_data_dir, fname))]], |
|
119 [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'images'), |
|
120 [join(_data_dir, 'images', fname) for fname in listdir(join(_data_dir, 'images'))]], |
|
121 [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview'), |
|
122 [join(_data_dir, 'jquery-treeview', fname) for fname in listdir(join(_data_dir, 'jquery-treeview')) |
|
123 if not isdir(join(_data_dir, 'jquery-treeview', fname))]], |
|
124 [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview', 'images'), |
|
125 [join(_data_dir, 'jquery-treeview', 'images', fname) |
|
126 for fname in listdir(join(_data_dir, 'jquery-treeview', 'images'))]], |
|
127 [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc'), |
|
128 [join(_wdoc_dir, fname) for fname in listdir(_wdoc_dir) |
|
129 if not isdir(join(_wdoc_dir, fname))]], |
|
130 [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc', 'images'), |
|
131 [join(_wdocimages_dir, fname) for fname in listdir(_wdocimages_dir)]], |
|
132 [join('share', 'cubicweb', 'cubes', 'shared', 'i18n'), |
|
133 glob.glob(join(_i18n_dir, '*.po'))], |
|
134 # skeleton |
|
135 ] |
|
136 except OSError: |
|
137 # we are in an installed directory, don't care about this |
|
138 pass |