-
Notifications
You must be signed in to change notification settings - Fork 38
/
setup.py
33 lines (25 loc) · 932 Bytes
/
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
from __future__ import print_function
from distutils.core import setup
import os
PLUGIN_DIR = 'Extensions.YouTube'
def compile_translate():
for lang in os.listdir('po'):
if lang.endswith('.po'):
src = os.path.join('po', lang)
lang = lang[:-3]
destdir = os.path.join('src/locale', lang, 'LC_MESSAGES')
if not os.path.exists(destdir):
os.makedirs(destdir)
dest = os.path.join(destdir, 'YouTube.mo')
print("Language compile %s -> %s" % (src, dest))
if os.system("msgfmt '%s' -o '%s'" % (src, dest)) != 0:
raise RuntimeError("Failed to compile", src)
compile_translate()
setup(name='enigma2-plugin-extensions-youtube',
version='1.0',
author='Taapat',
author_email='[email protected]',
package_dir={PLUGIN_DIR: 'src'},
packages=[PLUGIN_DIR],
package_data={PLUGIN_DIR: ['*.png', 'icons/*.png', '*.svg', 'icons/*.svg', 'locale/*/LC_MESSAGES/*.mo']},
description='Watch YouTube videos')