summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-16 22:52:51 +0100
committerPapoteur <papoteur@mageia.org>2018-12-16 22:52:51 +0100
commitb6b051cb7e63392ca7877704fc1811ad4bf40171 (patch)
tree0ab1a6d8191f67bc0743bc4c6416206c1edf1484
parent0b8d8317065744194e58e4450faec5bf92e914d0 (diff)
downloadmageiawelcome-b6b051cb7e63392ca7877704fc1811ad4bf40171.tar
mageiawelcome-b6b051cb7e63392ca7877704fc1811ad4bf40171.tar.gz
mageiawelcome-b6b051cb7e63392ca7877704fc1811ad4bf40171.tar.bz2
mageiawelcome-b6b051cb7e63392ca7877704fc1811ad4bf40171.tar.xz
mageiawelcome-b6b051cb7e63392ca7877704fc1811ad4bf40171.zip
Add setup script
-rw-r--r--setup.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..1dc43c8
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,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,},
+ )