File: meson_python_compile.py

package info (click to toggle)
libgit2-glib 0.99.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,692 kB
  • sloc: ansic: 17,155; python: 1,989; makefile: 21; sh: 7
file content (14 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python3

import os
import subprocess
import sys

if not os.environ.get('DESTDIR'):
  libdir = sys.argv[1]

  print('Byte-compiling python modules...')
  subprocess.check_call(['python3', '-m', 'compileall', '-f', '-q', libdir])

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