diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2017-06-09 22:38:19 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-06-23 18:00:40 +0200 |
commit | 95256079d3457056fbcdf48e5d618a6e57af0439 (patch) | |
tree | 82339e1cce1701f965b65eb49a236f666fe8ec1a /meson_compile_python.py | |
parent | a1da1b32da5f4c1aa307a170cff80154f210c172 (diff) | |
download | totem-95256079d3457056fbcdf48e5d618a6e57af0439.tar.gz |
build: Port to meson build system
With additional testing and patches from Bastien Nocera
<hadess@hadess.net>
https://bugzilla.gnome.org/show_bug.cgi?id=783205
Diffstat (limited to 'meson_compile_python.py')
-rw-r--r-- | meson_compile_python.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meson_compile_python.py b/meson_compile_python.py new file mode 100644 index 000000000..11eba43ef --- /dev/null +++ b/meson_compile_python.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import os +import subprocess + +installdir = os.environ['MESON_INSTALL_PREFIX'] + +if not os.environ.get('DESTDIR'): + print('Byte-compiling python modules...') + subprocess.call(['pycompile', installdir]) + subprocess.call(['python', '-O', '-m', 'compileall', '-f', '-q', installdir]) |