1
0
Fork 0
gedit/build-aux/meson/post_install.py
Daniel Baumann 61eec86fe3
Adding upstream version 48.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 19:48:29 +02:00

17 lines
559 B
Python
Executable file

#!/usr/bin/env python3
import os
import subprocess
import sys
libdir = sys.argv[1]
# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
print('Compiling python modules...')
subprocess.call([sys.executable, '-m', 'compileall', '-f', '-q',
os.path.join(libdir, 'gedit', 'plugins')])
print('Compiling python modules (optimized versions) ...')
subprocess.call([sys.executable, '-O', '-m', 'compileall', '-f', '-q',
os.path.join(libdir, 'gedit', 'plugins')])