cubicweb/__pkginfo__.py
branch3.26
changeset 12270 0e89483f50a1
parent 12260 199851fcddd4
child 12271 1f792d76fca3
equal deleted inserted replaced
12269:f607080b82a9 12270:0e89483f50a1
    19 """cubicweb global packaging information for the cubicweb knowledge management
    19 """cubicweb global packaging information for the cubicweb knowledge management
    20 software
    20 software
    21 """
    21 """
    22 import sys
    22 import sys
    23 from os import listdir
    23 from os import listdir
    24 from os.path import join, isdir
    24 from os.path import join
    25 import glob
       
    26 
    25 
    27 
    26 
    28 modname = distname = "cubicweb"
    27 modname = distname = "cubicweb"
    29 
    28 
    30 numversion = (3, 26, 0)
    29 numversion = (3, 26, 0)
    42     'Programming Language :: Python',
    41     'Programming Language :: Python',
    43     'Programming Language :: JavaScript',
    42     'Programming Language :: JavaScript',
    44 ]
    43 ]
    45 
    44 
    46 _server_migration_dir = join(modname, 'misc', 'migration')
    45 _server_migration_dir = join(modname, 'misc', 'migration')
    47 _data_dir = join(modname, 'web', 'data')
       
    48 _wdoc_dir = join(modname, 'web', 'wdoc')
       
    49 _wdocimages_dir = join(_wdoc_dir, 'images')
       
    50 _views_dir = join(modname, 'web', 'views')
       
    51 _i18n_dir = join(modname, 'i18n')
       
    52 
    46 
    53 _pyversion = '.'.join(str(num) for num in sys.version_info[0:2])
    47 _pyversion = '.'.join(str(num) for num in sys.version_info[0:2])
    54 if '--home' in sys.argv:
    48 if '--home' in sys.argv:
    55     # --home install
    49     # --home install
    56     pydir = 'python' + _pyversion
    50     pydir = 'python' + _pyversion
    68     data_files = [
    62     data_files = [
    69         # server data
    63         # server data
    70         [join('share', 'cubicweb', 'migration'),
    64         [join('share', 'cubicweb', 'migration'),
    71          [join(_server_migration_dir, filename)
    65          [join(_server_migration_dir, filename)
    72           for filename in listdir(_server_migration_dir)]],
    66           for filename in listdir(_server_migration_dir)]],
    73         # web data
    67     ]
    74         [join('share', 'cubicweb', 'cubes', 'shared', 'data'),
       
    75          [join(_data_dir, fname) for fname in listdir(_data_dir)
       
    76           if not isdir(join(_data_dir, fname))]],
       
    77         [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'images'),
       
    78          [join(_data_dir, 'images', fname) for fname in listdir(join(_data_dir, 'images'))]],
       
    79         [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview'),
       
    80          [join(_data_dir, 'jquery-treeview', fname) for fname in listdir(join(_data_dir, 'jquery-treeview'))
       
    81           if not isdir(join(_data_dir, 'jquery-treeview', fname))]],
       
    82         [join('share', 'cubicweb', 'cubes', 'shared', 'data', 'jquery-treeview', 'images'),
       
    83          [join(_data_dir, 'jquery-treeview', 'images', fname)
       
    84           for fname in listdir(join(_data_dir, 'jquery-treeview', 'images'))]],
       
    85         [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc'),
       
    86          [join(_wdoc_dir, fname) for fname in listdir(_wdoc_dir)
       
    87           if not isdir(join(_wdoc_dir, fname))]],
       
    88         [join('share', 'cubicweb', 'cubes', 'shared', 'wdoc', 'images'),
       
    89          [join(_wdocimages_dir, fname) for fname in listdir(_wdocimages_dir)]],
       
    90         [join('share', 'cubicweb', 'cubes', 'shared', 'i18n'),
       
    91          glob.glob(join(_i18n_dir, '*.po'))],
       
    92         # skeleton
       
    93         ]
       
    94 except OSError:
    68 except OSError:
    95     # we are in an installed directory, don't care about this
    69     # we are in an installed directory, don't care about this
    96     pass
    70     pass