Add i18n/l10n for jack_mix_box and jack_mixer C library
[jack_mixer.git] / meson_postinstall.py
blob58b763c2fed76704185c0554a5865ad67cbb8a5f
1 #!/usr/bin/env python3
3 import sysconfig
4 from compileall import compile_dir
5 from os import environ, path
7 prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
8 datadir = path.join(prefix, 'share')
9 destdir = environ.get('MESON_INSTALL_DESTDIR_PREFIX', '')
11 # Package managers set this so we don't need to run
12 if 'DESTDIR' not in environ:
13 from subprocess import call
14 print('Updating icon cache...')
15 call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
17 print('Compiling Python module to bytecode...')
18 moduledir = sysconfig.get_path('purelib', vars={'base': destdir})
19 compile_dir(path.join(moduledir, 'jack_mixer'), optimize=1)