forked from QubesOS/qubes-desktop-linux-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (43 loc) · 1.52 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3
''' Setup.py file '''
import os
import subprocess
import setuptools
def create_mo_files():
data_files = []
localedir = 'locales'
po_dirs = [localedir + '/' + l + '/LC_MESSAGES/'
for l in next(os.walk(localedir))[1]]
for d in po_dirs:
mo_files = []
po_files = [f
for f in next(os.walk(d))[2]
if os.path.splitext(f)[1] == '.po']
for po_file in po_files:
filename, extension = os.path.splitext(po_file)
mo_file = filename + '.mo'
msgfmt_cmd = 'msgfmt {} -o {}'.format(d + po_file, d + mo_file)
subprocess.check_call(msgfmt_cmd, shell=True)
mo_files.append(d + mo_file)
data_files.append((d, mo_files))
return data_files
setuptools.setup(name='qui',
version='0.1',
author='Invisible Things Lab',
author_email='[email protected]',
description='Qubes User Interface Package',
license='GPL2+',
url='https://www.qubes-os.org/',
packages=("qui", "qui.tray"),
entry_points={
'gui_scripts': [
'qui-domains = qui.tray.domains:main',
'qui-devices = qui.tray.devices:main',
'qui-disk-space = qui.tray.disk_space:main',
'qui-updates = qui.tray.updates:main',
'qubes-update-gui = qui.updater:main',
'qui-clipboard = qui.clipboard:main'
]
},
package_data={'qui': ["updater.glade"]},
data_files=create_mo_files())