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)