File: meson_compile_python.py

package info (click to toggle)
totem 3.30.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 16,608 kB
  • sloc: ansic: 31,538; python: 1,210; xml: 257; makefile: 226; sh: 108
file content (13 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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(['python', '-m', 'compileall', '-f', '-q', installdir])

  print('Byte-compiling python modules (optimized versions) ...')
  subprocess.call(['python', '-O', '-m', 'compileall', '-f', '-q', installdir])