__pkginfo__.py 5.06 KB
Newer Older
1
# pylint: disable=W0622,C0103
Aurelien Campeas's avatar
Aurelien Campeas committed
2
# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
3
4
5
6
7
8
9
10
11
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
#
# CubicWeb is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 2.1 of the License, or (at your option)
# any later version.
#
12
# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
13
14
15
16
17
18
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
Adrien Di Mascio's avatar
Adrien Di Mascio committed
19
20
21
22
"""cubicweb global packaging information for the cubicweb knowledge management
software
"""

23
modname = distname = "cubicweb"
Adrien Di Mascio's avatar
Adrien Di Mascio committed
24

25
numversion = (3, 22, 2)
26
version = '.'.join(str(num) for num in numversion) + '.dev0'
Adrien Di Mascio's avatar
Adrien Di Mascio committed
27

28
description = "a repository of entities / relations for knowledge management"
Adrien Di Mascio's avatar
Adrien Di Mascio committed
29
30
author = "Logilab"
author_email = "contact@logilab.fr"
31
web = 'https://www.cubicweb.org'
32
license = 'LGPL'
Adrien Di Mascio's avatar
Adrien Di Mascio committed
33

Arthur Lutz's avatar
Arthur Lutz committed
34
35
36
37
38
39
40
classifiers = [
           'Environment :: Web Environment',
           'Framework :: CubicWeb',
           'Programming Language :: Python',
           'Programming Language :: JavaScript',
]

41
__depends__ = {
42
    'six': '>= 1.4.0',
43
    'logilab-common': '>= 1.2.0',
44
    'logilab-mtconverter': '>= 0.8.0',
Julien Cristau's avatar
Julien Cristau committed
45
    'rql': '>= 0.34.0',
46
    'yams': '>= 0.42.0',  # TODO '>= 0.43.0' upon release.
47
    #gettext                    # for xgettext, msgcat, etc...
48
    # web dependencies
49
50
51
    'lxml': '',
    # XXX graphviz
    # server dependencies
52
    'logilab-database': '>= 1.15.0',
53
    'passlib': '',
54
    'pytz': '',
55
56
    'Markdown': '',
    'unittest2': '>= 0.7.0',
57
58
59
    }

__recommends__ = {
David Douard's avatar
David Douard committed
60
    'docutils': '>= 0.6',
61
    'Pillow': '',               # for captcha
62
63
64
    'pycrypto': '',             # for crypto extensions
    'fyzz': '>= 0.1.0',         # for sparql
    'vobject': '>= 0.6.0',      # for ical view
65
    'rdflib': None,             #
66
    'pyzmq': None,
Denis Laxalde's avatar
Denis Laxalde committed
67
    'Twisted': '< 16.0.0',
68
69
70
    #'Products.FCKeditor':'',
    #'SimpleTAL':'>= 4.1.6',
    }
Adrien Di Mascio's avatar
Adrien Di Mascio committed
71

72
import sys
Adrien Di Mascio's avatar
Adrien Di Mascio committed
73
74
75
76
77
78
from os import listdir, environ
from os.path import join, isdir
import glob

scripts = [s for s in glob.glob(join('bin', 'cubicweb-*'))
           if not s.endswith('.bat')]
Sylvain Thenault's avatar
Sylvain Thenault committed
79
include_dirs = [join('test', 'data'),
Adrien Di Mascio's avatar
Adrien Di Mascio committed
80
                join('server', 'test', 'data'),
81
                join('hooks', 'test', 'data'),
Adrien Di Mascio's avatar
Adrien Di Mascio committed
82
                join('web', 'test', 'data'),
83
                join('devtools', 'data'),
Sylvain Thenault's avatar
Sylvain Thenault committed
84
                join('devtools', 'test', 'data'),
85
                'schemas', 'skeleton']
Adrien Di Mascio's avatar
Adrien Di Mascio committed
86
87


88
89
90
_server_migration_dir = join(modname, 'misc', 'migration')
_data_dir = join(modname, 'web', 'data')
_wdoc_dir = join(modname, 'web', 'wdoc')
91
_wdocimages_dir = join(_wdoc_dir, 'images')
92
93
_views_dir = join(modname, 'web', 'views')
_i18n_dir = join(modname, 'i18n')
Adrien Di Mascio's avatar
Adrien Di Mascio committed
94

95
96
_pyversion = '.'.join(str(num) for num in sys.version_info[0:2])
if '--home' in sys.argv:
Adrien Di Mascio's avatar
Adrien Di Mascio committed
97
    # --home install
98
    pydir = 'python' + _pyversion
Adrien Di Mascio's avatar
Adrien Di Mascio committed
99
else:
100
    pydir = join('python' + _pyversion, 'site-packages')
101

102
103
104
105
106
# data files that shall be copied into the main package directory
package_data = {
    'cubicweb.web.views':['*.pt'],
    }

Adrien Di Mascio's avatar
Adrien Di Mascio committed
107
try:
108
    # data files that shall be copied outside the main package directory
Adrien Di Mascio's avatar
Adrien Di Mascio committed
109
110
111
    data_files = [
        # server data
        [join('share', 'cubicweb', 'schemas'),
112
         glob.glob(join(modname, 'schemas', '*.sql'))],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
113
        [join('share', 'cubicweb', 'migration'),
114
115
         [join(_server_migration_dir, filename)
          for filename in listdir(_server_migration_dir)]],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
116
117
        # web data
        [join('share', 'cubicweb', 'cubes', 'shared', 'data'),
118
119
         [join(_data_dir, fname) for fname in listdir(_data_dir)
          if not isdir(join(_data_dir, fname))]],
120
        [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'images'),
Sylvain Thénault's avatar
Sylvain Thénault committed
121
         [join(_data_dir, 'images', fname) for fname in listdir(join(_data_dir, 'images'))]],
Julien Cristau's avatar
Julien Cristau committed
122
        [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview'),
Julien Cristau's avatar
Julien Cristau committed
123
124
125
126
127
         [join(_data_dir, 'jquery-treeview', fname) for fname in listdir(join(_data_dir, 'jquery-treeview'))
          if not isdir(join(_data_dir, 'jquery-treeview', fname))]],
        [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview', 'images'),
         [join(_data_dir, 'jquery-treeview', 'images', fname)
          for fname in listdir(join(_data_dir, 'jquery-treeview', 'images'))]],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
128
        [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc'),
129
130
         [join(_wdoc_dir, fname) for fname in listdir(_wdoc_dir)
          if not isdir(join(_wdoc_dir, fname))]],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
131
        [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc', 'images'),
132
         [join(_wdocimages_dir, fname) for fname in listdir(_wdocimages_dir)]],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
133
        [join('share', 'cubicweb', 'cubes', 'shared', 'i18n'),
134
         glob.glob(join(_i18n_dir, '*.po'))],
135
        # skeleton
Adrien Di Mascio's avatar
Adrien Di Mascio committed
136
137
138
139
        ]
except OSError:
    # we are in an installed directory, don't care about this
    pass