File: meson_compile_python.py

package info (click to toggle)
totem 43.2-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,496 kB
  • sloc: ansic: 30,058; python: 964; makefile: 228; xml: 221; sh: 157
file content (13 lines) | stat: -rw-r--r-- 403 bytes parent folder | download | duplicates (4)
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(['python3', '-m', 'compileall', '-f', '-q', installdir])

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