from distutils.core import setup from distutils.command.build import build import os, glob LOCALE_DIR= '/usr/share/mageiasync/translations' class BuildQm(build): os.system('pylupdate5 mageiaSync.pro') for ts in glob.glob('translations/*.ts'): os.system('lrelease {0} -qm {1}'.format(ts, (ts[:-2]+'qm'))) data_files = [("share/applications/", ["share/applications/mageiasync.desktop"]), ("share/icons/hicolor/scalable/apps/", ["share/icons/mageiasync.svg"]), ("share/mageiasync/translations/",glob.glob('translations/*.qm')), ] setup( name = 'mageiasync', version = '0.3.4', packages = ['mageiaSync'], scripts = ['mageiasync'], license = 'GNU General Public License v3 (GPLv3)', url = 'http://gitweb.mageia.org/qa/MageiaSync/', description = 'This tool downloads ISO images from mirror or Mageia testing server.', long_description = 'This tool uses rsync with a GUI', platforms = ['Linux'], author = 'Papoteur', author_email = 'papoteur@mageialinux-online.org', maintainer = 'daviddavid', maintainer_email = 'david.david@mageialinux-online.org', data_files = data_files, cmdclass = {'build_qm': BuildQm,}, )