forked from mhsabbagh/green-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
29 lines (25 loc) · 1.08 KB
/
setup.py
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
#!/usr/bin/python
from distutils.core import setup
from subprocess import call
from glob import glob
from os.path import splitext, split
data_files = [ ("share/green-recorder", ["ui/ui.glade"]),
("share/pixmaps", ["data/green-recorder.png"]),
("share/applications", ["data/green-recorder.desktop"]) ]
po_files = glob("po/*.po")
for po_file in po_files:
lang = splitext(split(po_file)[1])[0]
mo_path = "locale/{}/LC_MESSAGES/green-recorder.mo".format(lang)
call("mkdir -p locale/{}/LC_MESSAGES/".format(lang), shell=True)
call("msgfmt {} -o {}".format(po_file, mo_path), shell=True)
locales = map(lambda i: ('share/'+i, [i+'/green-recorder.mo', ]), glob('locale/*/LC_MESSAGES'))
data_files.extend(locales)
setup(name = "green-recorder",
version = "3.0.4",
description = "Record your desktop easily using a simple GUI",
author = "FOSS Project",
author_email = "[email protected]",
url = "https://github.com/foss-project/green-recorder/",
license='GPLv3',
scripts=['green-recorder'],
data_files=data_files)