__pkginfo__.py 4.08 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
"""cubicweb global packaging information for the cubicweb knowledge management
software
"""
22
23
24
25
26
import sys
from os import listdir
from os.path import join, isdir
import glob

Adrien Di Mascio's avatar
Adrien Di Mascio committed
27

28
modname = distname = "cubicweb"
Adrien Di Mascio's avatar
Adrien Di Mascio committed
29

30
numversion = (3, 25, 0)
Denis Laxalde's avatar
Denis Laxalde committed
31
version = '.'.join(str(num) for num in numversion) + 'rc0'
Adrien Di Mascio's avatar
Adrien Di Mascio committed
32

33
description = "a repository of entities / relations for knowledge management"
Adrien Di Mascio's avatar
Adrien Di Mascio committed
34
35
author = "Logilab"
author_email = "contact@logilab.fr"
36
web = 'https://www.cubicweb.org'
37
license = 'LGPL'
Adrien Di Mascio's avatar
Adrien Di Mascio committed
38

Arthur Lutz's avatar
Arthur Lutz committed
39
classifiers = [
40
41
42
43
    'Environment :: Web Environment',
    'Framework :: CubicWeb',
    'Programming Language :: Python',
    'Programming Language :: JavaScript',
Arthur Lutz's avatar
Arthur Lutz committed
44
45
]

Adrien Di Mascio's avatar
Adrien Di Mascio committed
46
47
scripts = [s for s in glob.glob(join('bin', 'cubicweb-*'))
           if not s.endswith('.bat')]
Sylvain Thenault's avatar
Sylvain Thenault committed
48
include_dirs = [join('test', 'data'),
Adrien Di Mascio's avatar
Adrien Di Mascio committed
49
                join('server', 'test', 'data'),
50
                join('hooks', 'test', 'data'),
Adrien Di Mascio's avatar
Adrien Di Mascio committed
51
                join('web', 'test', 'data'),
52
                join('devtools', 'data'),
Sylvain Thenault's avatar
Sylvain Thenault committed
53
                join('devtools', 'test', 'data'),
54
                'schemas', 'skeleton']
Adrien Di Mascio's avatar
Adrien Di Mascio committed
55
56


57
58
59
_server_migration_dir = join(modname, 'misc', 'migration')
_data_dir = join(modname, 'web', 'data')
_wdoc_dir = join(modname, 'web', 'wdoc')
60
_wdocimages_dir = join(_wdoc_dir, 'images')
61
62
_views_dir = join(modname, 'web', 'views')
_i18n_dir = join(modname, 'i18n')
Adrien Di Mascio's avatar
Adrien Di Mascio committed
63

64
65
_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
66
    # --home install
67
    pydir = 'python' + _pyversion
Adrien Di Mascio's avatar
Adrien Di Mascio committed
68
else:
69
    pydir = join('python' + _pyversion, 'site-packages')
70

71
72
# data files that shall be copied into the main package directory
package_data = {
73
74
    'cubicweb.web.views': ['*.pt'],
}
75

Adrien Di Mascio's avatar
Adrien Di Mascio committed
76
try:
77
    # data files that shall be copied outside the main package directory
Adrien Di Mascio's avatar
Adrien Di Mascio committed
78
79
80
    data_files = [
        # server data
        [join('share', 'cubicweb', 'migration'),
81
82
         [join(_server_migration_dir, filename)
          for filename in listdir(_server_migration_dir)]],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
83
84
        # web data
        [join('share', 'cubicweb', 'cubes', 'shared', 'data'),
85
86
         [join(_data_dir, fname) for fname in listdir(_data_dir)
          if not isdir(join(_data_dir, fname))]],
87
        [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'images'),
Sylvain Thénault's avatar
Sylvain Thénault committed
88
         [join(_data_dir, 'images', fname) for fname in listdir(join(_data_dir, 'images'))]],
Julien Cristau's avatar
Julien Cristau committed
89
        [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview'),
Julien Cristau's avatar
Julien Cristau committed
90
91
92
93
94
         [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
95
        [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc'),
96
97
         [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
98
        [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc', 'images'),
99
         [join(_wdocimages_dir, fname) for fname in listdir(_wdocimages_dir)]],
Adrien Di Mascio's avatar
Adrien Di Mascio committed
100
        [join('share', 'cubicweb', 'cubes', 'shared', 'i18n'),
101
         glob.glob(join(_i18n_dir, '*.po'))],
102
        # skeleton
Adrien Di Mascio's avatar
Adrien Di Mascio committed
103
104
105
106
        ]
except OSError:
    # we are in an installed directory, don't care about this
    pass