summaryrefslogtreecommitdiffstats
path: root/setup.py
blob: 1dc43c8767750f33560391a074badfb69c06031f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from distutils.core import setup
from distutils.command.build import build
import os, glob

LOCALE_DIR= '/usr/share/mageiawelcome/translations'

class BuildQm(build):    
  for po in glob.glob('po/*.po'):
    os.system('lconvert {} -o i18n/mageiawelcome_{}.ts'.format(po, os.path.splitext("path_to_file")[0]))
  for ts in glob.glob('i18n/*.ts'):
    os.system('lrelease {0} -qm {1}'.format(ts, (ts[:-2]+'qm')))
  os.system("rm -f i18n/*.ps")

data_files = [("share/applications/", ["share/applications/mageiawelcome.desktop"]),
              ("share/icons/hicolor/scalable/apps/", ["share/icons/mageiawelcome.svg"]),
	      ("share/mageiawelcome/translations/",glob.glob('i18n/*.qm')),
              ]

setup(
        name = 'mageiasync',
        version = '1.90',
        license = 'GNU General Public License v3 (GPLv3)',
        url = 'http://gitweb.mageia.org/software/mageiawelcome',
        description = 'Welcome Screen shows important information of the Mageia distribution.',
        platforms = ['Linux'],
        author = 'Daniel Napora',
        author_email = 'napcok@gmail.com',
        data_files = data_files,
        cmdclass = {'build_qm': BuildQm,},
        )